﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
    xmlns:controlsPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
    xmlns:dataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
    xmlns:visualizationToolkit="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
    xmlns:inputPrimitivesToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
    xmlns:inputToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:layoutPrimitivesToolkit="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit"
    xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
    xmlns:theming="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.Toolkit"
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    xmlns:themingToolkit="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.Toolkit"
    xmlns:whistlerBlue="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.WhistlerBlue"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions">

    <!-- Theme -->
    <SolidColorBrush
        x:Key="ThemeBackgroundBrush"
        Color="White" />
    <SolidColorBrush
        x:Key="ThemeForegroundBrush"
        Color="Black" />
    <Style
        TargetType="themingToolkit:Theme">
        <Setter
            Property="Background"
            Value="{StaticResource ThemeBackgroundBrush}" />
        <Setter
            Property="Foreground"
            Value="{StaticResource ThemeForegroundBrush}" />
    </Style>
    <Style
        TargetType="whistlerBlue:WhistlerBlueTheme">
        <Setter
            Property="Background"
            Value="{StaticResource ThemeBackgroundBrush}" />
        <Setter
            Property="Foreground"
            Value="{StaticResource ThemeForegroundBrush}" />
    </Style>

    <!--new color palette-->
    <Color
        x:Key="BorderColor1">#FF425080</Color>
    <Color
        x:Key="TextForegroundColor1">#FF425080</Color>

    <!--ValidationTooltipTemplate-->
    <ControlTemplate
        x:Key="ValidationToolTipTemplate">
        <Grid
            x:Name="Root"
            Margin="5,0"
            Opacity="0"
            RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup
                    x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition
                            GeneratedDuration="0" />
                        <VisualTransition
                            GeneratedDuration="0:0:0.2"
                            To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetName="xform"
                                    Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame
                                        KeyTime="0:0:0.2"
                                        Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetName="Root"
                                    Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame
                                        KeyTime="0:0:0.2"
                                        Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState
                        x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames
                                Storyboard.TargetName="Root"
                                Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame
                                    KeyTime="0"
                                    Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState
                        x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames
                                Storyboard.TargetName="xform"
                                Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame
                                    KeyTime="0"
                                    Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames
                                Storyboard.TargetName="Root"
                                Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame
                                    KeyTime="0"
                                    Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform
                    x:Name="xform"
                    X="-25" />
            </Grid.RenderTransform>
            <Border
                Margin="4,4,-4,-4"
                Background="#152A2E31"
                CornerRadius="4" />
            <Border
                Margin="3,3,-3,-3"
                Background="#252A2E31"
                CornerRadius="4" />
            <Border
                Margin="2,2,-2,-2"
                Background="#352A2E31"
                CornerRadius="4" />
            <Border
                Margin="1,1,-1,-1"
                Background="#452A2E31"
                CornerRadius="4" />
            <Border
                Background="#FFDC000C"
                CornerRadius="4" />
            <Border
                CornerRadius="4">
                <Border.Background>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#66FFFFFF" />
                        <GradientStop
                            Color="#66000000"
                            Offset="1" />
                        <GradientStop
                            Color="#00E5E5E5"
                            Offset="0.1" />
                        <GradientStop
                            Color="#00161616"
                            Offset="0.9" />
                    </LinearGradientBrush>
                </Border.Background>
                <TextBlock
                    Margin="8,3,8,4"
                    MaxWidth="250"
                    UseLayoutRounding="false"
                    Foreground="White"
                    Text="{Binding (Validation.Errors)[0].ErrorContent}"
                    TextWrapping="Wrap" />
            </Border>
        </Grid>
    </ControlTemplate>

    <!-- Color Palette -->
    <SolidColorBrush
        x:Key="OutsideFontColor"
        Color="#FF000000" />
    <SolidColorBrush
        x:Key="ButtonFontColor"
        Color="#FF042271" />
    <Color
        x:Key="Focus">#FF04CCFF</Color>
    <Color
        x:Key="HyperlinkFocus">#FF2B54BA</Color>
    <Color
        x:Key="Calendar">#FF0066CC</Color>
    <Color
        x:Key="PressStroke1">#FF1D415C</Color>
    <Color
        x:Key="PressStroke2">#FF2C628B</Color>
    <Color
        x:Key="TabStroke">#FF4F8BB9</Color>
    <Color
        x:Key="DataSortArrow">#3F2C628B</Color>
    <!--PressStroke2, 25%-->
    <Color
        x:Key="DropLocate">#FF6392C8</Color>
    <Color
        x:Key="TreeviewArrowNorm">#FF76D5FD</Color>
    <Color
        x:Key="TreeviewArrowOver">#FFC1EFF8</Color>
    <Color
        x:Key="TreeviewArrowCheck">#FF6380EE</Color>
    <Color
        x:Key="ExpandArrowStroke">#FF688DC4</Color>
    <Color
        x:Key="Arrow">#FF425080</Color>
    <Color
        x:Key="Arrow2">#FF7682E4</Color>
    <Color
        x:Key="TextBkgSelection">#FF309AFF</Color>
    <Color
        x:Key="TextboxOver1">#FF5296BD</Color>
    <Color
        x:Key="TextboxOver2">#FFC2E4F6</Color>
    <Color
        x:Key="TextboxPress1">#FF3B79AC</Color>
    <Color
        x:Key="TextboxPress2">#FFB2DBED</Color>
    <Color
        x:Key="ItemOver1">#FFF4FAFD</Color>
    <Color
        x:Key="ItemOver2">#FFCFEDFD</Color>
    <Color
        x:Key="ItemOverStroke">#FFD8F0FA</Color>
    <Color
        x:Key="ItemSelectStroke">#FF98DDFB</Color>
    <Color
        x:Key="Over1">#FFE2F5FF</Color>
    <Color
        x:Key="Over2">#FFC0E7FC</Color>
    <Color
        x:Key="Over3">#FF9EDDFF</Color>
    <Color
        x:Key="Press1">#FF759FB6</Color>
    <Color
        x:Key="Press2">#FFB6E0F6</Color>
    <Color
        x:Key="Press3">#FF9DD5F4</Color>
    <Color
        x:Key="PressHighlight">#FF387599</Color>
    <Color
        x:Key="ButtonHighlightMid">#0095D9FF</Color>
    <Color
        x:Key="ButtonHighlightMid2">#9935A6E6</Color>
    <!--60%-->
    <Color
        x:Key="ButtonHighlightMid3">#A535A6E6</Color>
    <!--65%-->
    <Color
        x:Key="RadioIcon1">#FF90D5E5</Color>
    <Color
        x:Key="RadioIcon2">#FF28A2D1</Color>
    <Color
        x:Key="RadioIcon3">#FF1898D1</Color>
    <Color
        x:Key="RadioIcon4">#FF0F83C7</Color>
    <Color
        x:Key="RadioIconOver1">#FF1EBEFF</Color>
    <Color
        x:Key="RadioIconOver2">#FF13A2F3</Color>
    <Color
        x:Key="RadioIconPress1">#99759FB6</Color>
    <!--Press1, 60%-->
    <Color
        x:Key="RadioIconPress2">#FF4B8DAF</Color>
    <Color
        x:Key="RadioStroke">#FF275674"</Color>
    <Color
        x:Key="CheckInnerOver">#FF79C6F9</Color>
    <Color
        x:Key="CheckInnerOver2">#FFAFDEFD"</Color>
    <Color
        x:Key="CheckInnerPress">#FF5EB6F7</Color>
    <Color
        x:Key="CheckInnerPress2">#FF90CFFC"</Color>
    <Color
        x:Key="CheckOutterOver">#FF5989A5"</Color>
    <Color
        x:Key="CheckOutterOver2">#FFDEF9FA"</Color>
    <Color
        x:Key="ThumbPress1">#FF6CBBE5</Color>
    <Color
        x:Key="ThumbPress2">#FF50A1CC</Color>
    <Color
        x:Key="ExpanderOver1">#FFB1E7FE</Color>
    <Color
        x:Key="ExpanderOver2">#FFEAFFFF</Color>
    <Color
        x:Key="ExpanderOver3">#A56EB4F6</Color>
    <Color
        x:Key="ExpanderMid">#009DD5F4</Color>
    <!--Press3, 0%-->
    <Color
        x:Key="ExpanderPress1">#FF80CEFF</Color>
    <Color
        x:Key="ExpanderPress2">#FF2D84CF</Color>
    <Color
        x:Key="ThumbDivetOver">#E5387599</Color>
    <!--PressHighlight, 20%-->
    <Color
        x:Key="ThumbDivetFill1">#199DD5F4</Color>
    <!--Press3, 10%-->
    <Color
        x:Key="ThumbDivetFill2">#33387599</Color>
    <!--PressHighlight, 20%-->
    <!-- End Color Palette-->


    <!-- Communal Static Resources -->
    <SolidColorBrush
        x:Key="btnFocus"
        Color="{StaticResource Focus}" />
    <SolidColorBrush
        x:Key="btnPressStroke1"
        Color="{StaticResource PressStroke1}" />
    <SolidColorBrush
        x:Key="btnPressStroke2"
        Color="{StaticResource PressStroke2}" />

    <LinearGradientBrush
        x:Key="btnPressBorder"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource PressStroke1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource PressStroke2}"
            Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush
        x:Key="hyperlinkPress"
        Color="{StaticResource HyperlinkFocus}" />
    <SolidColorBrush
        x:Key="calendarBtnFill"
        Color="{StaticResource Over2}" />
    <SolidColorBrush
        x:Key="calendarTodayStroke"
        Color="{StaticResource Calendar}" />
    <SolidColorBrush
        x:Key="treeviewArrowUnchecked"
        Color="{StaticResource TreeviewArrowNorm}" />
    <SolidColorBrush
        x:Key="treeviewArrowHover"
        Color="{StaticResource TreeviewArrowOver}" />
    <SolidColorBrush
        x:Key="treeviewArrowChecked"
        Color="{StaticResource TreeviewArrowCheck}" />

    <SolidColorBrush
        x:Key="TextBackgroundSelection"
        Color="{StaticResource TextBkgSelection}" />
    <SolidColorBrush
        x:Key="TextBoxOverBrush"
        Color="{StaticResource TextboxOver1}" />
    <SolidColorBrush
        x:Key="TextBoxPressBrush"
        Color="{StaticResource TextboxPress1}" />

    <LinearGradientBrush
        x:Key="TextBoxOver"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource TextboxOver1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource TextboxOver2}"
            Offset="0.355" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="TextBoxFocus"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource TextboxPress1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource TextboxPress2}"
            Offset="0.355" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="TextBoxNorm"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="#FFABAEB3"
            Offset="0" />
        <GradientStop
            Color="#FFE2E8EE"
            Offset="0.355" />
    </LinearGradientBrush>

    <LinearGradientBrush
        x:Key="grayGradient"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="#FFFFFFFF"
            Offset="0" />
        <GradientStop
            Color="#FFEDEDED"
            Offset="0.171" />
        <GradientStop
            Color="#FFE7E7E7"
            Offset="0.5" />
        <GradientStop
            Color="#FFDCDCDC"
            Offset="0.51" />
        <GradientStop
            Color="#FFEAEBEC"
            Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush
        x:Key="hoverStroke"
        Color="{StaticResource ItemOverStroke}" />
    <SolidColorBrush
        x:Key="selectedStroke"
        Color="{StaticResource ItemSelectStroke}" />

    <LinearGradientBrush
        x:Key="hoverGradient"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource ItemOver1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource ItemOver2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="hoverGradientVertical"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource ItemOver1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource ItemOver2}"
            Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush
        x:Key="BtnOverFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.509" />
        <GradientStop
            Color="{StaticResource Over3}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="BtnPressFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource Press1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource Press2}"
            Offset="0.152" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Press3}"
            Offset="0.509" />
    </LinearGradientBrush>

    <!-- standard button specific resources -->
    <LinearGradientBrush
        x:Key="btnOverFillHighlight"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource ButtonHighlightMid2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.101" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.899" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="btnPressFillHighlight"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource PressHighlight}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid3}"
            Offset="0.037" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.143" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.857" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid3}"
            Offset="0.963" />
        <GradientStop
            Color="{StaticResource PressHighlight}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- Radio/Checkbox specific resources -->
    <SolidColorBrush
        x:Key="checkOverStroke"
        Color="{StaticResource CheckOutterOver}" />
    <SolidColorBrush
        x:Key="checkOverFill"
        Color="{StaticResource CheckOutterOver2}" />
    <SolidColorBrush
        x:Key="checkPressFill"
        Color="{StaticResource TextboxOver2}" />
    <SolidColorBrush
        x:Key="checkInnerOverFill"
        Color="{StaticResource CheckInnerOver2}" />
    <SolidColorBrush
        x:Key="checkInnerPressFill"
        Color="{StaticResource CheckInnerPress2}" />
    <SolidColorBrush
        x:Key="checkIconStroke"
        Color="{StaticResource Arrow}" />
    <SolidColorBrush
        x:Key="radioIconStroke"
        Color="{StaticResource RadioStroke}" />

    <LinearGradientBrush
        x:Key="radioIconFill"
        EndPoint="0.8,0.8"
        StartPoint="0.3,0.3">
        <GradientStop
            Color="{StaticResource RadioIcon1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource RadioIcon2}"
            Offset="0.179" />
        <GradientStop
            Color="{StaticResource RadioIcon3}"
            Offset="0.496" />
        <GradientStop
            Color="{StaticResource RadioIcon4}"
            Offset="0.812" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="radioIconFillOver"
        EndPoint="0.8,0.8"
        StartPoint="0.3,0.3">
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource Focus}"
            Offset="0.179" />
        <GradientStop
            Color="{StaticResource RadioIconOver1}"
            Offset="0.496" />
        <GradientStop
            Color="{StaticResource RadioIconOver2}"
            Offset="0.812" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="radioIconFillPress"
        EndPoint="0.8,0.8"
        StartPoint="0.3,0.3">
        <GradientStop
            Color="{StaticResource RadioIconPress1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource RadioIconPress2}"
            Offset="0.317" />
        <GradientStop
            Color="{StaticResource PressHighlight}"
            Offset="0.504" />
        <GradientStop
            Color="{StaticResource PressStroke2}"
            Offset="0.817" />
    </LinearGradientBrush>

    <LinearGradientBrush
        x:Key="checkInnerOverStroke"
        EndPoint="0.8,0.8"
        StartPoint="0.3,0.3">
        <GradientStop
            Color="{StaticResource CheckInnerOver}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ItemOver2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="checkInnerPressStroke"
        EndPoint="0.8,0.8"
        StartPoint="0.3,0.3">
        <GradientStop
            Color="{StaticResource CheckInnerPress}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- slider specific resources -->
    <LinearGradientBrush
        x:Key="ThumbOver"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="#FFFFFFFF"
            Offset="0" />
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.484" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.493" />
        <GradientStop
            Color="{StaticResource Over3}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ThumbPress"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource ItemOver1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource Press3}"
            Offset="0.576" />
        <GradientStop
            Color="{StaticResource ThumbPress1}"
            Offset="0.581" />
        <GradientStop
            Color="{StaticResource ThumbPress2}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- datagrid specific resources -->
    <SolidColorBrush
        x:Key="HeaderSeparator"
        Color="#FFD7D5D8" />
    <SolidColorBrush
        x:Key="GridBorder"
        Color="#FFD6D7D6" />

    <SolidColorBrush
        x:Key="dropLocator"
        Color="{StaticResource DropLocate}" />
    <LinearGradientBrush
        x:Key="sortArrow"
        EndPoint="0.725,0.832"
        StartPoint="0.275,0.168">
        <GradientStop
            Color="{StaticResource PressStroke2}" />
        <GradientStop
            Color="{StaticResource DataSortArrow}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- combobox/datepicker/numericupdown specific resources -->
    <LinearGradientBrush
        x:Key="ComboTogglePressHighlight"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource PressHighlight}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid3}"
            Offset="0.088" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.221" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid}"
            Offset="0.779" />
        <GradientStop
            Color="{StaticResource ButtonHighlightMid3}"
            Offset="0.912" />
        <GradientStop
            Color="{StaticResource PressHighlight}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- expander specific resources -->
    <SolidColorBrush
        x:Key="expanderArrowStroke"
        Color="{StaticResource ExpandArrowStroke}" />

    <LinearGradientBrush
        x:Key="ExpanderArrowHoverFill1"
        EndPoint="0,1"
        StartPoint="0,0">
        <GradientStop
            Color="{StaticResource ItemOver1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ExpanderOver1}"
            Offset="0.52" />
        <GradientStop
            Color="{StaticResource Over3}"
            Offset="0.521" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.78" />
        <GradientStop
            Color="{StaticResource ExpanderOver2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ExpanderArrowHoverFill2"
        EndPoint="1,0"
        StartPoint="0,0">
        <GradientStop
            Color="{StaticResource ExpanderOver3}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ExpanderMid}"
            Offset="0.346" />
        <GradientStop
            Color="{StaticResource ExpanderMid}"
            Offset="0.696" />
        <GradientStop
            Color="{StaticResource ExpanderOver3}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ExpanderArrowHoverFill3"
        EndPoint="0,1"
        StartPoint="0,0">
        <GradientStop
            Color="#B9FFFFFF"
            Offset="0" />
        <GradientStop
            Color="#33FFFFFF"
            Offset="0.51" />
        <GradientStop
            Color="#00FFFFFF"
            Offset="0.52" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ExpanderArrowPressedFill1"
        EndPoint="0,1"
        StartPoint="0,0">
        <GradientStop
            Color="{StaticResource ItemOver2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ExpanderPress1}"
            Offset="0.52" />
        <GradientStop
            Color="{StaticResource CheckInnerOver}"
            Offset="0.521" />
        <GradientStop
            Color="{StaticResource TreeviewArrowOver}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ExpanderArrowPressedFill2"
        EndPoint="1,0"
        StartPoint="0,0">
        <GradientStop
            Color="{StaticResource ExpanderPress2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ExpanderMid}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource ExpanderPress2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ExpanderArrowPressedFill3"
        EndPoint="0,1"
        StartPoint="0,0">
        <GradientStop
            Color="#A5FFFFFF"
            Offset="0" />
        <GradientStop
            Color="#26FFFFFF"
            Offset="0.506" />
        <GradientStop
            Color="#00FFFFFF"
            Offset="0.521" />
    </LinearGradientBrush>

    <!-- Tab specific resources -->
    <SolidColorBrush
        x:Key="TabOverStroke"
        Color="{StaticResource TabStroke}" />

    <!-- Tab vertical (btn over vertical) -->
    <LinearGradientBrush
        x:Key="VTabOverGradient"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.509" />
        <GradientStop
            Color="{StaticResource Over3}"
            Offset="1" />
    </LinearGradientBrush>

    <!-- Scrollbar specific resources -->
    <SolidColorBrush
        x:Key="ScrollbarBkgNormStroke"
        Color="#FFA4A4A4" />

    <LinearGradientBrush
        x:Key="HScrollbarBkgNormFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="#FFEFEFF0"
            Offset="0.5" />
        <GradientStop
            Color="#FFD5D6D8"
            Offset="0.513" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HScrollbarBkgOverFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.513" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HScrollbarBkgPressFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0">
        <GradientStop
            Color="{StaticResource Press2}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource ThumbPress1}"
            Offset="0.513" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VScrollbarBkgNormFill"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="#FFEFEFF0"
            Offset="0.5" />
        <GradientStop
            Color="#FFD5D6D8"
            Offset="0.513" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VScrollbarBkgOverFill"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource Over1}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource Over2}"
            Offset="0.513" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VScrollbarBkgPressFill"
        EndPoint="1,0.5"
        StartPoint="0,0.5">
        <GradientStop
            Color="{StaticResource Press2}"
            Offset="0.5" />
        <GradientStop
            Color="{StaticResource ThumbPress1}"
            Offset="0.513" />
    </LinearGradientBrush>

    <LinearGradientBrush
        x:Key="HThumbDivetNormFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="#FF979797"
            Offset="0" />
        <GradientStop
            Color="#19979797"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HThumbDivetNormStroke"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="#B2000000"
            Offset="0" />
        <GradientStop
            Color="#33000000"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HThumbDivetOverFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="{StaticResource Press3}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill1}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HThumbDivetOverStroke"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="{StaticResource ThumbDivetOver}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HThumbDivetPressFill"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="{StaticResource RadioIconPress2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill1}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="HThumbDivetPressStroke"
        EndPoint="0.5,1"
        StartPoint="0.5,0.1">
        <GradientStop
            Color="{StaticResource PressStroke1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetNormFill"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="#FF979797"
            Offset="0" />
        <GradientStop
            Color="#19979797"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetNormStroke"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="#B2000000"
            Offset="0" />
        <GradientStop
            Color="#33000000"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetOverFill"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="{StaticResource Press3}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill1}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetOverStroke"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="{StaticResource ThumbDivetOver}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill2}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetPressFill"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="{StaticResource RadioIconPress2}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill1}"
            Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="VThumbDivetPressStroke"
        EndPoint="1,0.5"
        StartPoint="0.1,0.5">
        <GradientStop
            Color="{StaticResource PressStroke1}"
            Offset="0" />
        <GradientStop
            Color="{StaticResource ThumbDivetFill2}"
            Offset="1" />
    </LinearGradientBrush>
    <!-- End Static Resources -->

    <Style
        TargetType="ToolTip">
        <Setter
            Property="Foreground"
            Value="#FF525552" />
        <Setter
            Property="Padding"
            Value="3,0,3,0" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ToolTip">
                    <Border
                        x:Name="Root">
                        <Border
                            BorderBrush="#FF737573"
                            BorderThickness="1"
                            CornerRadius="2"
                            Padding="4">
                            <Border.Resources>
                                <Storyboard
                                    x:Key="Visible State" />
                                <Storyboard
                                    x:Key="Normal State" />
                            </Border.Resources>
                            <Border.Background>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#FFFFFFFF"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#FFE7E7F7"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <ContentPresenter
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Cursor="{TemplateBinding Cursor}"
                                Margin="{TemplateBinding Padding}" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ScrollBar">
        <Setter
            Property="MinWidth"
            Value="17" />
        <Setter
            Property="MinHeight"
            Value="17" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ScrollBar">
                    <Grid
                        x:Name="Root"
                        Visibility="Visible">
                        <Grid.Resources>

                            <!-- RepeatButton Templates -->
                            <ControlTemplate
                                x:Key="RepeatButtonTemplate"
                                TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root"
                                    Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualState
                                                x:Name="Normal" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Grid>
                            </ControlTemplate>

                            <!-- Horizontal Inc/Dec Templates -->
                            <ControlTemplate
                                x:Key="HorizontalIncrementTemplate"
                                TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="Over"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="Press"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="DisabledElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To=".7" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="Background"
                                        Fill="{StaticResource HScrollbarBkgNormFill}"
                                        Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5" />
                                    <Rectangle
                                        x:Name="Over"
                                        Fill="{StaticResource HScrollbarBkgOverFill}"
                                        Stroke="{StaticResource TextBoxPressBrush}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="Press"
                                        Fill="{StaticResource HScrollbarBkgPressFill}"
                                        Stroke="{StaticResource btnPressStroke2}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="Highlight"
                                        Margin="1"
                                        Stroke="#99FFFFFF"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0.9"
                                        IsHitTestVisible="false" />
                                    <Rectangle
                                        x:Name="DisabledElement"
                                        Fill="#FFFFFFFF"
                                        Opacity="0" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="HorizontalDecrementTemplate"
                                TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundMouseOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPressed"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="DisabledElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To=".7" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="Background"
                                        Fill="{StaticResource HScrollbarBkgNormFill}"
                                        Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5" />
                                    <Rectangle
                                        x:Name="BackgroundMouseOver"
                                        Fill="{StaticResource HScrollbarBkgOverFill}"
                                        Stroke="{StaticResource TextBoxPressBrush}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="BackgroundPressed"
                                        Fill="{StaticResource HScrollbarBkgPressFill}"
                                        Stroke="{StaticResource btnPressStroke2}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="Highlight"
                                        Margin="1"
                                        Stroke="#FFFFFFFF"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0.9"
                                        IsHitTestVisible="false" />
                                    <Rectangle
                                        x:Name="DisabledElement"
                                        Fill="#FFFFFFFF"
                                        Opacity="0" />
                                </Grid>
                            </ControlTemplate>

                            <!-- Vertical Inc/Dec Templates -->
                            <ControlTemplate
                                x:Key="VerticalIncrementTemplate"
                                TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPressed"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="DisabledElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To=".7" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="Background"
                                        Fill="{StaticResource VScrollbarBkgNormFill}"
                                        Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5" />
                                    <Rectangle
                                        x:Name="BackgroundOver"
                                        Fill="{StaticResource VScrollbarBkgOverFill}"
                                        Stroke="{StaticResource TextBoxPressBrush}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="BackgroundPressed"
                                        Fill="{StaticResource VScrollbarBkgPressFill}"
                                        Stroke="{StaticResource btnPressStroke2}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="Highlight"
                                        Margin="1"
                                        Stroke="#99FFFFFF"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0.9"
                                        IsHitTestVisible="false" />
                                    <Rectangle
                                        x:Name="DisabledElement"
                                        Fill="#FFFFFFFF"
                                        Opacity="0" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="VerticalDecrementTemplate"
                                TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundMouseOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPressed"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="DisabledElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To=".7" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="Background"
                                        Fill="{StaticResource VScrollbarBkgNormFill}"
                                        Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5" />
                                    <Rectangle
                                        x:Name="BackgroundMouseOver"
                                        Fill="{StaticResource VScrollbarBkgOverFill}"
                                        Stroke="{StaticResource TextBoxPressBrush}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="BackgroundPressed"
                                        Fill="{StaticResource VScrollbarBkgPressFill}"
                                        Stroke="{StaticResource btnPressStroke2}"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0" />
                                    <Rectangle
                                        x:Name="Highlight"
                                        Margin="1"
                                        Stroke="#99FFFFFF"
                                        StrokeThickness="1"
                                        RadiusX="0.5"
                                        RadiusY="0.5"
                                        Opacity="0.9"
                                        IsHitTestVisible="false" />
                                    <Rectangle
                                        x:Name="DisabledElement"
                                        Fill="#FFFFFFFF"
                                        Opacity="0" />
                                </Grid>
                            </ControlTemplate>

                            <!-- Thumb Templates -->
                            <ControlTemplate
                                x:Key="VerticalThumbTemplate"
                                TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPressed"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="ThumbVisual"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid
                                        x:Name="ThumbVisual">
                                        <Rectangle
                                            x:Name="Background"
                                            Fill="{StaticResource VScrollbarBkgNormFill}"
                                            Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                            RadiusX="1.5"
                                            RadiusY="1.5" />
                                        <Rectangle
                                            x:Name="BackgroundOver"
                                            Fill="{StaticResource VScrollbarBkgOverFill}"
                                            Stroke="{StaticResource TextBoxPressBrush}"
                                            RadiusX="1.5"
                                            RadiusY="1.5"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="BackgroundPressed"
                                            Fill="{StaticResource VScrollbarBkgPressFill}"
                                            Stroke="{StaticResource btnPressStroke2}"
                                            RadiusX="1.5"
                                            RadiusY="1.5"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="BorderHighlight"
                                            Width="11"
                                            Height="10"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush
                                                    EndPoint="1,0.5"
                                                    StartPoint="0,0.5">
                                                    <GradientStop
                                                        Color="#00FFFFFF"
                                                        Offset="0" />
                                                    <GradientStop
                                                        Color="#59FFFFFF"
                                                        Offset="1" />
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Border
                                            Margin="0,0,0,6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetNormFill}"
                                            BorderBrush="{StaticResource VThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center" />
                                        <Border
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetNormFill}"
                                            BorderBrush="{StaticResource VThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center" />
                                        <Border
                                            Margin="0,0,0,-6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetNormFill}"
                                            BorderBrush="{StaticResource VThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center" />
                                        <Border
                                            x:Name="BorderOver"
                                            Margin="0,0,0,6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetOverFill}"
                                            BorderBrush="{StaticResource VThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderOver1"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetOverFill}"
                                            BorderBrush="{StaticResource VThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderOver2"
                                            Margin="0,0,0,-6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetOverFill}"
                                            BorderBrush="{StaticResource VThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress"
                                            Margin="0,0,0,6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetPressFill}"
                                            BorderBrush="{StaticResource VThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress1"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetPressFill}"
                                            BorderBrush="{StaticResource VThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress2"
                                            Margin="0,0,0,-6"
                                            Width="9"
                                            Height="2"
                                            Background="{StaticResource VThumbDivetPressFill}"
                                            BorderBrush="{StaticResource VThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="Highlight"
                                            Margin="1"
                                            Stroke="#FFFFFFFF"
                                            RadiusX="0.5"
                                            RadiusY="0.5"
                                            Opacity="0.6"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="HorizontalThumbTemplate"
                                TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    To="MouseOver"
                                                    GeneratedDuration="0:0:0.1" />
                                                <VisualTransition
                                                    To="Pressed"
                                                    GeneratedDuration="0:0:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderOver2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPressed"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BorderPress2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="ThumbVisual"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid
                                        x:Name="ThumbVisual"
                                        Grid.RowSpan="2">
                                        <Rectangle
                                            x:Name="Background"
                                            Fill="{StaticResource HScrollbarBkgNormFill}"
                                            Stroke="{StaticResource ScrollbarBkgNormStroke}"
                                            RadiusX="1.5"
                                            RadiusY="1.5" />
                                        <Rectangle
                                            x:Name="BackgroundOver"
                                            Fill="{StaticResource HScrollbarBkgOverFill}"
                                            Stroke="{StaticResource TextBoxPressBrush}"
                                            RadiusX="1.5"
                                            RadiusY="1.5"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="BackgroundPressed"
                                            Fill="{StaticResource HScrollbarBkgPressFill}"
                                            Stroke="{StaticResource btnPressStroke2}"
                                            RadiusX="1.5"
                                            RadiusY="1.5"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="BorderHighlight"
                                            Width="10"
                                            Height="11"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush
                                                    EndPoint="0.5,1"
                                                    StartPoint="0.5,0">
                                                    <GradientStop
                                                        Color="#00FFFFFF"
                                                        Offset="0" />
                                                    <GradientStop
                                                        Color="#59FFFFFF"
                                                        Offset="1" />
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Border
                                            Margin="0,0,6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetNormFill}"
                                            BorderBrush="{StaticResource HThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center" />
                                        <Border
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetNormFill}"
                                            BorderBrush="{StaticResource HThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center" />
                                        <Border
                                            Margin="0,0,-6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetNormFill}"
                                            BorderBrush="{StaticResource HThumbDivetNormStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center" />
                                        <Border
                                            x:Name="BorderOver"
                                            Margin="0,0,6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetOverFill}"
                                            BorderBrush="{StaticResource HThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderOver1"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetOverFill}"
                                            BorderBrush="{StaticResource HThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderOver2"
                                            Margin="0,0,-6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetOverFill}"
                                            BorderBrush="{StaticResource HThumbDivetOverStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress"
                                            Margin="0,0,6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetPressFill}"
                                            BorderBrush="{StaticResource HThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress1"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetPressFill}"
                                            BorderBrush="{StaticResource HThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BorderPress2"
                                            Margin="0,0,-6,0"
                                            Width="2"
                                            Height="9"
                                            Background="{StaticResource HThumbDivetPressFill}"
                                            BorderBrush="{StaticResource HThumbDivetPressStroke}"
                                            BorderThickness="1,1,0,0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Opacity="0" />
                                        <Rectangle
                                            x:Name="Highlight"
                                            Margin="1"
                                            Stroke="#FFFFFFFF"
                                            RadiusX="0.5"
                                            RadiusY="0.5"
                                            Opacity="0.6"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="HorizontalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="HorizontalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="VerticalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="VerticalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Root"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.5" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid
                            x:Name="HorizontalRoot">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="*" />
                                <ColumnDefinition
                                    Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <!-- Track Layer -->
                            <Rectangle
                                Grid.ColumnSpan="5"
                                RadiusX="0"
                                RadiusY="0"
                                StrokeThickness="1"
                                Stroke="#FFF0F0F0"
                                Fill="#FFEFEFEF" />

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton
                                x:Name="HorizontalSmallDecrease"
                                Grid.Column="0"
                                Width="18"
                                Opacity="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource HorizontalDecrementTemplate}" />
                            <RepeatButton
                                x:Name="HorizontalLargeDecrease"
                                Grid.Column="1"
                                Width="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="HorizontalThumb"
                                Grid.Column="2"
                                MinWidth="18"
                                Width="18"
                                Template="{StaticResource HorizontalThumbTemplate}" />
                            <RepeatButton
                                x:Name="HorizontalLargeIncrease"
                                Grid.Column="3"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <RepeatButton
                                x:Name="HorizontalSmallIncrease"
                                Grid.Column="4"
                                Width="18"
                                Opacity="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource HorizontalIncrementTemplate}" />
                            <Path
                                Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z "
                                Grid.Column="0"
                                Height="10"
                                Width="6"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="Uniform"
                                IsHitTestVisible="False"
                                x:Name="ArrowLeft">
                                <Path.Fill>
                                    <LinearGradientBrush
                                        EndPoint="0.75,0.7"
                                        StartPoint="0,0.25">
                                        <GradientStop
                                            Color="#CC000000"
                                            Offset="0.25" />
                                        <GradientStop
                                            Color="#7F000000"
                                            Offset="0.75" />
                                        <GradientStop
                                            Color="#33000000"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path
                                Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z "
                                Grid.Column="4"
                                Height="10"
                                Width="6"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="Uniform"
                                IsHitTestVisible="False"
                                x:Name="ArrowRight">
                                <Path.Fill>
                                    <LinearGradientBrush
                                        EndPoint="1,0.4"
                                        StartPoint="0,-0.3">
                                        <GradientStop
                                            Color="#CC000000"
                                            Offset="0.25" />
                                        <GradientStop
                                            Color="#7F000000"
                                            Offset="0.75" />
                                        <GradientStop
                                            Color="#33000000"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                        </Grid>

                        <!-- Vertical Template -->
                        <Grid
                            x:Name="VerticalRoot"
                            Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="*" />
                                <RowDefinition
                                    Height="Auto" />
                            </Grid.RowDefinitions>

                            <!-- Track Layer -->
                            <Rectangle
                                Grid.RowSpan="5"
                                RadiusX="0"
                                RadiusY="0"
                                StrokeThickness="1"
                                Stroke="#FFF0F0F0"
                                Fill="#FFEFEFEF" />

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton
                                x:Name="VerticalSmallDecrease"
                                Grid.Row="0"
                                Height="18"
                                Opacity="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource VerticalDecrementTemplate}" />
                            <RepeatButton
                                x:Name="VerticalLargeDecrease"
                                Grid.Row="1"
                                Height="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="VerticalThumb"
                                Grid.Row="2"
                                MinHeight="18"
                                Height="18"
                                Template="{StaticResource VerticalThumbTemplate}" />
                            <RepeatButton
                                x:Name="VerticalLargeIncrease"
                                Grid.Row="3"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <RepeatButton
                                x:Name="VerticalSmallIncrease"
                                Grid.Row="4"
                                Height="18"
                                Opacity="0"
                                Interval="50"
                                IsTabStop="False"
                                Template="{StaticResource VerticalIncrementTemplate}" />
                            <Path
                                x:Name="ArrowUp"
                                Height="6"
                                Width="10"
                                Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="Uniform"
                                IsHitTestVisible="False">
                                <Path.Fill>
                                    <LinearGradientBrush
                                        EndPoint="0.7,0.75"
                                        StartPoint="0.25,0">
                                        <GradientStop
                                            Color="#CC000000"
                                            Offset="0.25" />
                                        <GradientStop
                                            Color="#7F000000"
                                            Offset="0.75" />
                                        <GradientStop
                                            Color="#33000000"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path
                                x:Name="ArrowDown"
                                Grid.Row="4"
                                Height="6"
                                Width="10"
                                Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="Uniform"
                                IsHitTestVisible="False">
                                <Path.Fill>
                                    <LinearGradientBrush
                                        EndPoint="0.4,1"
                                        StartPoint="-0.3,0">
                                        <GradientStop
                                            Color="#CC000000"
                                            Offset="0.25" />
                                        <GradientStop
                                            Color="#7F000000"
                                            Offset="0.75" />
                                        <GradientStop
                                            Color="#33000000"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ScrollViewer">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalScrollBarVisibility"
            Value="Visible" />
        <Setter
            Property="Padding"
            Value="0" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="BorderBrush"
            Value="#FFA4A4A4" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ScrollViewer">
                    <Border
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="1">
                        <Grid
                            Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="*" />
                                <RowDefinition
                                    Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="*" />
                                <ColumnDefinition
                                    Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <ScrollContentPresenter
                                x:Name="ScrollContentPresenter"
                                Cursor="{TemplateBinding Cursor}"
                                Margin="{TemplateBinding Padding}"
                                ContentTemplate="{TemplateBinding ContentTemplate}" />

                            <ScrollBar
                                x:Name="VerticalScrollBar"
                                Width="16"
                                IsTabStop="False"
                                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                Grid.Column="1"
                                Grid.Row="0"
                                Orientation="Vertical"
                                ViewportSize="{TemplateBinding ViewportHeight}"
                                Maximum="{TemplateBinding ScrollableHeight}"
                                Minimum="0"
                                Value="{TemplateBinding VerticalOffset}"
                                IsEnabled="True" />

                            <ScrollBar
                                x:Name="HorizontalScrollBar"
                                Height="16"
                                IsTabStop="False"
                                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                Grid.Column="0"
                                Grid.Row="1"
                                Orientation="Horizontal"
                                ViewportSize="{TemplateBinding ViewportWidth}"
                                Maximum="{TemplateBinding ScrollableWidth}"
                                Minimum="0"
                                Value="{TemplateBinding HorizontalOffset}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ComboBoxItem">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="TabNavigation"
            Value="Local" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ComboBoxItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.73" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard />
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelected"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused" />
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="BackgroundGradientOver"
                            Fill="{StaticResource hoverGradient}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundGradientSelected"
                            Fill="{StaticResource BtnOverFill}"
                            Stroke="{StaticResource selectedStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundHighlight"
                            Margin="1"
                            Stroke="#A0FFFFFF"
                            RadiusX="1"
                            RadiusY="1" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ListBoxItem">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="TabNavigation"
            Value="Local" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ListBoxItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.73" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelected"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelectedDisabled"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused" />
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="BackgroundGradientOver"
                            Fill="{StaticResource hoverGradient}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundGradientSelectedDisabled"
                            Fill="{StaticResource grayGradient}"
                            Stroke="#7F8E8F8F"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundGradientSelected"
                            Fill="{StaticResource BtnOverFill}"
                            Stroke="{StaticResource selectedStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundHighlight"
                            Margin="1"
                            Stroke="#A0FFFFFF"
                            RadiusX="1"
                            RadiusY="1" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ListBox">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="BorderBrush"
            Value="{StaticResource btnPressStroke2}" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Padding"
            Value="1" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ListBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="#FFFFFFFF"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            CornerRadius="2">
                            <ScrollViewer
                                x:Name="ScrollViewer"
                                BorderThickness="0"
                                Padding="{TemplateBinding Padding}">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                        <Border
                            x:Name="ValidationErrorElement"
                            Visibility="Collapsed"
                            BorderBrush="#FFDB000C"
                            BorderThickness="1"
                            CornerRadius="7">
                            <ToolTipService.ToolTip>
                                <ToolTip
                                    x:Name="validationTooltip"
                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                    Template="{StaticResource ValidationToolTipTemplate}"
                                    Placement="Right"
                                    PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger
                                            RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Storyboard.TargetName="validationTooltip"
                                                        Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>true</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid
                                Height="12"
                                HorizontalAlignment="Right"
                                Margin="1,-4,-4,0"
                                VerticalAlignment="Top"
                                Width="12"
                                Background="Transparent">
                                <Path
                                    Fill="#FFDC000C"
                                    Margin="1,3,0,0"
                                    Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path
                                    Fill="#ffffff"
                                    Margin="1,3,0,0"
                                    Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ComboBox">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="Padding"
            Value="6,2,25,2" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ComboBox">
                    <Grid>
                        <Grid.Resources>
                            <Style
                                x:Name="comboToggleStyle"
                                TargetType="ToggleButton">
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="ToggleButton">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualStateGroup.Transitions>
                                                            <VisualTransition
                                                                GeneratedDuration="00:00:00.1"
                                                                To="MouseOver" />
                                                            <VisualTransition
                                                                GeneratedDuration="00:00:00.1"
                                                                To="Pressed" />
                                                        </VisualStateGroup.Transitions>
                                                        <VisualState
                                                            x:Name="Normal">
                                                            <Storyboard />
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="BtnOver"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.8" />
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="Background_over"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="BtnPress"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.8" />
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="Background_press"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="BtnPress_highlight"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Duration="0"
                                                                    Storyboard.TargetName="DisabledVisualElement"
                                                                    Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="CheckStates">
                                                        <VisualState
                                                            x:Name="Checked">
                                                            <Storyboard />
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unchecked" />
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused" />
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle
                                                    x:Name="Background"
                                                    Fill="#FFFFFFFF"
                                                    Stroke="#FFABAEB3"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    IsHitTestVisible="false" />
                                                <Rectangle
                                                    x:Name="Background_over"
                                                    Stroke="{StaticResource TextBoxOverBrush}"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    Opacity="0"
                                                    IsHitTestVisible="false" />
                                                <Rectangle
                                                    x:Name="Background_press"
                                                    Stroke="{StaticResource TextBoxPressBrush}"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    Opacity="0"
                                                    IsHitTestVisible="false" />
                                                <Border
                                                    x:Name="BtnOver"
                                                    Width="20"
                                                    Background="{StaticResource BtnOverFill}"
                                                    BorderBrush="{StaticResource TextBoxPressBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="0,3,3,0"
                                                    Opacity="0"
                                                    HorizontalAlignment="Right" />
                                                <Border
                                                    x:Name="BtnPress"
                                                    Width="20"
                                                    Background="{StaticResource BtnPressFill}"
                                                    BorderBrush="{StaticResource btnPressStroke1}"
                                                    BorderThickness="1"
                                                    CornerRadius="0,3,3,0"
                                                    Opacity="0"
                                                    HorizontalAlignment="Right" />
                                                <Border
                                                    x:Name="BtnPress_highlight"
                                                    Background="{StaticResource ComboTogglePressHighlight}"
                                                    Margin="1"
                                                    Width="18"
                                                    CornerRadius="0,2,2,0"
                                                    Opacity="0"
                                                    HorizontalAlignment="Right" />
                                                <Border
                                                    x:Name="BtnOverlay"
                                                    Margin="1"
                                                    Width="18"
                                                    CornerRadius="0,2,2,0"
                                                    HorizontalAlignment="Right">
                                                    <Border.Background>
                                                        <LinearGradientBrush
                                                            EndPoint="0.5,1"
                                                            StartPoint="0.5,0">
                                                            <GradientStop
                                                                Color="#00FFFFFF" />
                                                            <GradientStop
                                                                Color="#72FFFFFF"
                                                                Offset="0.189" />
                                                            <GradientStop
                                                                Color="#72FFFFFF"
                                                                Offset="0.5" />
                                                            <GradientStop
                                                                Color="#00FFFFFF"
                                                                Offset="0.51" />
                                                        </LinearGradientBrush>
                                                    </Border.Background>
                                                </Border>
                                                <Path
                                                    x:Name="BtnArrow"
                                                    Margin="0,0,7,0"
                                                    Width="6"
                                                    Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z "
                                                    HorizontalAlignment="Right"
                                                    Stretch="Uniform">
                                                    <Path.Fill>
                                                        <LinearGradientBrush
                                                            EndPoint="0.5,1"
                                                            StartPoint="0.5,0">
                                                            <GradientStop
                                                                Color="{StaticResource Arrow}"
                                                                Offset="0" />
                                                            <GradientStop
                                                                Color="#FF000000"
                                                                Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                                <Rectangle
                                                    x:Name="DisabledVisualElement"
                                                    Margin="1"
                                                    Fill="#00FFFFFF"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    IsHitTestVisible="false"
                                                    Visibility="Collapsed" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                                <VisualState
                                    x:Name="FocusedDropDown" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Popup
                            x:Name="Popup">
                            <Border
                                x:Name="PopupBorder"
                                Background="#FFFFFFFF"
                                BorderBrush="{StaticResource TextBoxNorm}"
                                BorderThickness="1"
                                CornerRadius="1,1,3,3">
                                <ScrollViewer
                                    x:Name="ScrollViewer"
                                    Padding="1"
                                    BorderThickness="0">
                                    <ItemsPresenter />
                                </ScrollViewer>
                            </Border>
                        </Popup>
                        <Border
                            x:Name="ContentPresenterBorder">
                            <Grid
                                Height="22">
                                <ToggleButton
                                    x:Name="DropDownToggle"
                                    Style="{StaticResource comboToggleStyle}" />
                                <ContentPresenter
                                    x:Name="ContentPresenter"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="Center">
                                    <TextBlock
                                        Text=" " />
                                </ContentPresenter>
                                <Rectangle
                                    x:Name="DisabledVisualElement"
                                    Fill="#A5FFFFFF"
                                    RadiusX="4"
                                    RadiusY="4"
                                    IsHitTestVisible="false"
                                    Visibility="Collapsed" />
                                <Rectangle
                                    x:Name="FocusVisualElement"
                                    Margin="-1"
                                    Stroke="{StaticResource selectedStroke}"
                                    StrokeThickness="1"
                                    RadiusX="4"
                                    RadiusY="4"
                                    IsHitTestVisible="false"
                                    Visibility="Collapsed" />
                            </Grid>
                        </Border>
                        <Border
                            x:Name="ValidationErrorElement"
                            Visibility="Collapsed"
                            BorderBrush="#FFDB000C"
                            BorderThickness="1"
                            CornerRadius="7">
                            <ToolTipService.ToolTip>
                                <ToolTip
                                    x:Name="validationTooltip"
                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                    Template="{StaticResource ValidationToolTipTemplate}"
                                    Placement="Right"
                                    PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger
                                            RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Storyboard.TargetName="validationTooltip"
                                                        Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>true</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid
                                Height="12"
                                HorizontalAlignment="Right"
                                Margin="1,-4,-4,0"
                                VerticalAlignment="Top"
                                Width="12"
                                Background="Transparent">
                                <Path
                                    Fill="#FFDC000C"
                                    Margin="1,3,0,0"
                                    Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path
                                    Fill="#ffffff"
                                    Margin="1,3,0,0"
                                    Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="dataPrimitives:DataGridColumnHeader">
        <Setter
            Property="FontWeight"
            Value="Bold" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="SeparatorBrush"
            Value="{StaticResource HeaderSeparator}" />
        <Setter
            Property="SeparatorVisibility"
            Value="Visible" />
        <Setter
            Property="Padding"
            Value="4,6,5,6" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="dataPrimitives:DataGridColumnHeader">
                    <Grid
                        x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="*" />
                            <ColumnDefinition
                                Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SortStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unsorted" />
                                <VisualState
                                    x:Name="SortAscending">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SortIcon"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="SortDescending">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SortIcon"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SortIcon"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                            To="-1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundGradientSelect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="BackgroundGradient"
                            Grid.ColumnSpan="2"
                            Stretch="Fill"
                            Fill="{StaticResource grayGradient}" />
                        <Rectangle
                            x:Name="BackgroundGradientOver"
                            Margin="-1,-1,1,0"
                            Grid.ColumnSpan="2"
                            Fill="{StaticResource BtnOverFill}"
                            Stroke="{StaticResource selectedStroke}"
                            Stretch="Fill"
                            Opacity="0" />
                        <Rectangle
                            x:Name="BackgroundGradientSelect"
                            Margin="-1,-1,1,0"
                            Grid.ColumnSpan="2"
                            Stretch="Fill"
                            Fill="{StaticResource hoverGradient}"
                            Stroke="{StaticResource selectedStroke}"
                            Opacity="0" />
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            Cursor="{TemplateBinding Cursor}" />
                        <Path
                            x:Name="SortIcon"
                            Margin="0,2,0,0"
                            Height="4"
                            Width="7"
                            Fill="{StaticResource sortArrow}"
                            Stretch="Uniform"
                            Opacity="0"
                            Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z "
                            HorizontalAlignment="Center"
                            VerticalAlignment="Top"
                            RenderTransformOrigin="0.5,0.5">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Rectangle
                            x:Name="VerticalSeparator"
                            Grid.Column="1"
                            Width="1"
                            Fill="{StaticResource HeaderSeparator}"
                            Visibility="{TemplateBinding SeparatorVisibility}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="data:DataGridCell">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="Cursor"
            Value="Arrow" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="data:DataGridCell">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CurrentStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Regular" />
                                <VisualState
                                    x:Name="Current">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="*" />
                            <ColumnDefinition
                                Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Rectangle
                            x:Name="FocusVisual"
                            Margin="0,-2,0,0"
                            Stroke="#FF000000"
                            Fill="#FFFFFFFF"
                            Opacity="0"
                            IsHitTestVisible="false" />
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Cursor="{TemplateBinding Cursor}" />
                        <Rectangle
                            x:Name="RightGridLine"
                            Grid.Column="1"
                            Width="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="dataPrimitives:DataGridRowHeader">
        <Setter
            Property="SeparatorBrush"
            Value="{StaticResource HeaderSeparator}" />
        <Setter
            Property="SeparatorVisibility"
            Value="Visible" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="dataPrimitives:DataGridRowHeader">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver CurrentRow Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentRowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Normal CurrentRow">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentRowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Normal Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentRowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Normal EditingRow">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentRowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="Auto" />
                            <ColumnDefinition
                                Width="*" />
                        </Grid.ColumnDefinitions>
                        <Rectangle
                            x:Name="Background"
                            Grid.ColumnSpan="2"
                            Fill="{StaticResource grayGradient}"
                            Stretch="Fill" />
                        <Rectangle
                            x:Name="HorizontalSeparator"
                            Height="1"
                            Grid.ColumnSpan="2"
                            Fill="{StaticResource HeaderSeparator}"
                            Stretch="Fill"
                            VerticalAlignment="Bottom"
                            Visibility="{TemplateBinding SeparatorVisibility}" />
                        <ContentPresenter
                            Margin="0,0,1,0"
                            Grid.Column="1"
                            Content="{TemplateBinding Content}"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center" />
                        <Path
                            x:Name="CurrentRowGlyph"
                            Margin="8,0,8,0"
                            Height="7"
                            Width="4"
                            Stretch="Fill"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Opacity="0"
                            Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                            <Path.Fill>
                                <LinearGradientBrush
                                    EndPoint="1.17,0.821"
                                    StartPoint="-0.17,0.179">
                                    <GradientStop
                                        Color="#E5000000" />
                                    <GradientStop
                                        Color="#26000000"
                                        Offset="0.991" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="data:DataGridRow">
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="data:DataGridRow">
                    <dataPrimitives:DataGridFrozenGrid
                        x:Name="Root">
                        <dataPrimitives:DataGridFrozenGrid.Resources>
                            <Storyboard
                                x:Key="DetailsVisibleTransition">
                                <DoubleAnimation
                                    Duration="00:00:0.1"
                                    Storyboard.TargetName="DetailsPresenter"
                                    Storyboard.TargetProperty="ContentHeight" />
                            </Storyboard>
                        </dataPrimitives:DataGridFrozenGrid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Normal AlternatingRow" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.73" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Normal Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Selected"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedHighlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Selected"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedHighlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Selected"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedHighlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <dataPrimitives:DataGridFrozenGrid.RowDefinitions>
                            <RowDefinition
                                Height="*" />
                            <RowDefinition
                                Height="Auto" />
                            <RowDefinition
                                Height="Auto" />
                        </dataPrimitives:DataGridFrozenGrid.RowDefinitions>
                        <dataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="Auto" />
                            <ColumnDefinition
                                Width="*" />
                        </dataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                        <Rectangle
                            x:Name="Selected"
                            Margin="0"
                            Grid.RowSpan="2"
                            Grid.ColumnSpan="2"
                            Fill="{StaticResource BtnOverFill}"
                            Stroke="{StaticResource selectedStroke}"
                            Opacity="0" />
                        <Rectangle
                            x:Name="SelectedHighlight"
                            Margin="1"
                            Grid.RowSpan="2"
                            Grid.ColumnSpan="2"
                            Stroke="#A0FFFFFF"
                            Opacity="0" />
                        <dataPrimitives:DataGridRowHeader
                            x:Name="RowHeader"
                            Grid.RowSpan="3"
                            dataPrimitives:DataGridFrozenGrid.IsFrozen="True" />
                        <Rectangle
                            x:Name="Over"
                            Margin="0"
                            Grid.RowSpan="2"
                            Grid.ColumnSpan="2"
                            Fill="{StaticResource hoverGradient}"
                            Stroke="{StaticResource hoverStroke}"
                            Opacity="0" />
                        <dataPrimitives:DataGridCellsPresenter
                            x:Name="CellsPresenter"
                            Grid.Column="1"
                            dataPrimitives:DataGridFrozenGrid.IsFrozen="True" />
                        <dataPrimitives:DataGridDetailsPresenter
                            x:Name="DetailsPresenter"
                            Grid.Column="1"
                            Grid.Row="1" />
                        <Rectangle
                            x:Name="BottomGridLine"
                            Height="1"
                            Grid.Column="1"
                            Grid.Row="2" />
                    </dataPrimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="data:DataGrid">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="AlternatingRowBackground"
            Value="#FFFFFFFF" />
        <Setter
            Property="RowBackground"
            Value="#FFFFFFFF" />
        <Setter
            Property="HeadersVisibility"
            Value="Column" />
        <Setter
            Property="GridLinesVisibility"
            Value="All" />
        <Setter
            Property="HorizontalScrollBarVisibility"
            Value="Auto" />
        <Setter
            Property="VerticalScrollBarVisibility"
            Value="Auto" />
        <Setter
            Property="RowDetailsVisibilityMode"
            Value="VisibleWhenSelected" />
        <Setter
            Property="SelectionMode"
            Value="Extended" />
        <Setter
            Property="CanUserReorderColumns"
            Value="True" />
        <Setter
            Property="CanUserResizeColumns"
            Value="True" />
        <Setter
            Property="CanUserSortColumns"
            Value="True" />
        <Setter
            Property="AutoGenerateColumns"
            Value="True" />
        <Setter
            Property="HorizontalGridLinesBrush"
            Value="#59D6D7D6" />
        <Setter
            Property="VerticalGridLinesBrush"
            Value="#59D6D7D6" />
        <Setter
            Property="IsTabStop"
            Value="True" />
        <Setter
            Property="DragIndicatorStyle">
            <Setter.Value>
                <Style
                    TargetType="ContentControl">
                    <Setter
                        Property="Foreground"
                        Value="#FFFFFFFF" />
                    <Setter
                        Property="Padding"
                        Value="4,6,5,5" />
                    <Setter
                        Property="Template">
                        <Setter.Value>
                            <ControlTemplate
                                TargetType="ContentControl">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            Width="*" />
                                        <ColumnDefinition
                                            Width="1" />
                                    </Grid.ColumnDefinitions>
                                    <Rectangle
                                        x:Name="BackgroundRectangle"
                                        Grid.ColumnSpan="2"
                                        Fill="{StaticResource grayGradient}"
                                        Opacity="0.84" />
                                    <ContentPresenter
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                    <Path
                                        x:Name="SortIcon"
                                        Margin="0,2,0,0"
                                        Height="4"
                                        Width="7"
                                        Fill="{StaticResource sortArrow}"
                                        Stretch="Uniform"
                                        Opacity="0"
                                        Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z "
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Top"
                                        RenderTransformOrigin="0.5,0.5" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="DropLocationIndicatorStyle">
            <Setter.Value>
                <Style
                    TargetType="Control">
                    <Setter
                        Property="Background"
                        Value="#FFFF0000" />
                    <Setter
                        Property="Template">
                        <Setter.Value>
                            <ControlTemplate
                                TargetType="Control">
                                <Rectangle
                                    x:Name="VerticalSeparator"
                                    Margin="-1,0,0,0"
                                    Grid.Column="1"
                                    Width="2"
                                    Fill="{StaticResource dropLocator}"
                                    Opacity=".5" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="data:DataGrid">
                    <Border
                        BorderThickness="1"
                        BorderBrush="{StaticResource GridBorder}">
                        <Grid
                            x:Name="Root"
                            Background="{TemplateBinding Background}">
                            <Grid.Resources>
                                <ControlTemplate
                                    x:Key="TopLeftHeaderTemplate"
                                    TargetType="dataPrimitives:DataGridColumnHeader">
                                    <Grid
                                        x:Name="RootElement">
                                        <Border
                                            Background="{StaticResource grayGradient}" />
                                        <Rectangle
                                            x:Name="VerticalSeparator"
                                            Margin="0,0,0,1"
                                            Width="1"
                                            Fill="{StaticResource HeaderSeparator}"
                                            HorizontalAlignment="Right" />
                                        <Rectangle
                                            x:Name="CornerPiece"
                                            Height="1"
                                            Width="1"
                                            Fill="{StaticResource GridBorder}"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Bottom" />
                                        <Rectangle
                                            x:Name="HorizontalSeparator"
                                            Margin="0,0,1,0"
                                            Height="1"
                                            Fill="{StaticResource HeaderSeparator}"
                                            VerticalAlignment="Bottom" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate
                                    x:Key="TopRightHeaderTemplate"
                                    TargetType="dataPrimitives:DataGridColumnHeader">
                                    <Grid
                                        x:Name="RootElement">
                                        <Border
                                            Background="{StaticResource grayGradient}" />
                                    </Grid>
                                </ControlTemplate>
                            </Grid.Resources>
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="*" />
                                <RowDefinition
                                    Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="*" />
                                <ColumnDefinition
                                    Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <dataPrimitives:DataGridColumnHeader
                                x:Name="TopLeftCornerHeader"
                                Template="{StaticResource TopLeftHeaderTemplate}" />
                            <dataPrimitives:DataGridColumnHeadersPresenter
                                x:Name="ColumnHeadersPresenter"
                                Grid.Column="1" />
                            <dataPrimitives:DataGridColumnHeader
                                x:Name="TopRightCornerHeader"
                                Grid.Column="2"
                                Template="{StaticResource TopRightHeaderTemplate}" />
                            <dataPrimitives:DataGridRowsPresenter
                                x:Name="RowsPresenter"
                                Grid.ColumnSpan="2"
                                Grid.Row="1" />
                            <Border
                                x:Name="BottomLeftCorner"
                                Grid.Row="2"
                                Background="{StaticResource grayGradient}" />
                            <Rectangle
                                x:Name="BottomRightCorner"
                                Grid.Column="2"
                                Grid.Row="2"
                                Fill="#FFEFEFEF"
                                Stroke="#FFFFFFFF"
                                StrokeThickness="1" />
                            <ScrollBar
                                x:Name="VerticalScrollbar"
                                Grid.Column="2"
                                Grid.Row="1"
                                Width="16"
                                Orientation="Vertical" />
                            <Grid
                                Grid.Column="1"
                                Grid.Row="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="Auto" />
                                    <ColumnDefinition
                                        Width="*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle
                                    x:Name="FrozenColumnScrollBarSpacer" />
                                <ScrollBar
                                    x:Name="HorizontalScrollbar"
                                    Grid.Column="1"
                                    Height="16"
                                    Orientation="Horizontal" />
                            </Grid>
                            <Rectangle
                                x:Name="VSeparator"
                                Margin="-1,0,0,0"
                                Width="1"
                                Grid.Column="1"
                                Grid.Row="1"
                                Grid.RowSpan="2"
                                Fill="{StaticResource GridBorder}"
                                HorizontalAlignment="Left" />
                            <Rectangle
                                x:Name="HSeparator"
                                Height="1"
                                Grid.Column="1"
                                Grid.ColumnSpan="2"
                                Fill="{StaticResource GridBorder}"
                                VerticalAlignment="Bottom" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="Button">
        <Setter
            Property="Foreground"
            Value="{StaticResource TextForegroundColor1}" />
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.65" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundPressed"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgoundPressed_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.65" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledOverlay"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="contentPresenter"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="BackgroundNorm"
                            Background="{StaticResource grayGradient}"
                            BorderThickness="1"
                            BorderBrush="#FF8E8F8F"
                            CornerRadius="3" />
                        <Border
                            x:Name="BackgroundNorm_highlight"
                            Margin="1"
                            BorderBrush="#F2FFFFFF"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0.65" />
                        <Border
                            x:Name="BackgroundOver"
                            Background="{StaticResource BtnOverFill}"
                            BorderBrush="{StaticResource TextBoxPressBrush}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundOver_Highlight"
                            Margin="1"
                            Background="{StaticResource btnOverFillHighlight}"
                            BorderBrush="{StaticResource hoverStroke}"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundPressed"
                            Background="{StaticResource BtnPressFill}"
                            BorderBrush="{StaticResource btnPressBorder}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgoundPressed_Highlight"
                            Background="{StaticResource btnPressFillHighlight}"
                            Margin="1"
                            CornerRadius="2.5"
                            Opacity="0" />
                        <Border
                            x:Name="Background_overlay"
                            Margin="1,1,1,0"
                            BorderThickness="1"
                            CornerRadius="3,3,0,0">
                            <Border.Background>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.157" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.5" />
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0.51" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#FFF1F1F1"
                            BorderBrush="#FFB2B2B2"
                            BorderThickness="1"
                            CornerRadius="3"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                        <TextBlock
                            Canvas.ZIndex="1"
                            x:Name="DisabledOverlay"
                            Text="{TemplateBinding Content}"
                            Foreground="#FF969696"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="FocusVisualElement"
                            Margin="1"
                            BorderBrush="{StaticResource btnFocus}"
                            BorderThickness="1"
                            CornerRadius="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="RepeatButton">
        <Setter
            Property="Foreground"
            Value="{StaticResource ButtonFontColor}" />
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="RepeatButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.65" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundPressed"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.84" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgoundPressed_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.65" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledOverlay"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="contentPresenter"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="BackgroundNorm"
                            Background="{StaticResource grayGradient}"
                            BorderThickness="1"
                            BorderBrush="#FF8E8F8F"
                            CornerRadius="3" />
                        <Border
                            x:Name="BackgroundNorm_highlight"
                            Margin="1"
                            BorderBrush="#F2FFFFFF"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0.65" />
                        <Border
                            x:Name="BackgroundOver"
                            Background="{StaticResource BtnOverFill}"
                            BorderBrush="{StaticResource TextBoxPressBrush}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundOver_Highlight"
                            Margin="1"
                            Background="{StaticResource btnOverFillHighlight}"
                            BorderBrush="{StaticResource hoverStroke}"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundPressed"
                            Background="{StaticResource BtnPressFill}"
                            BorderBrush="{StaticResource btnPressBorder}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgoundPressed_Highlight"
                            Background="{StaticResource btnPressFillHighlight}"
                            Margin="1"
                            CornerRadius="2.5"
                            Opacity="0" />
                        <Border
                            x:Name="Background_overlay"
                            Margin="1,1,1,0"
                            BorderThickness="1"
                            CornerRadius="3,3,0,0">
                            <Border.Background>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.157" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.5" />
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0.51" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#FFF1F1F1"
                            BorderBrush="#FFB2B2B2"
                            BorderThickness="1"
                            CornerRadius="3"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                        <TextBlock
                            Canvas.ZIndex="1"
                            x:Name="DisabledOverlay"
                            Text="{TemplateBinding Content}"
                            Foreground="#FF969696"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="FocusVisualElement"
                            Margin="1"
                            BorderBrush="{StaticResource btnFocus}"
                            BorderThickness="1"
                            CornerRadius="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ToggleButton">
        <Setter
            Property="Foreground"
            Value="{StaticResource ButtonFontColor}" />
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ToggleButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundOver_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgroundPressed"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BackgoundPressed_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledOverlay"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="contentPresenter"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CheckStates">
                                <VisualState
                                    x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundChecked"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgoundChecked_Highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="BackgroundNorm"
                            Background="{StaticResource grayGradient}"
                            BorderThickness="1"
                            BorderBrush="#FF8E8F8F"
                            CornerRadius="3" />
                        <Border
                            x:Name="BackgroundNorm_highlight"
                            Margin="1"
                            BorderBrush="#F2FFFFFF"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0.65" />
                        <Border
                            x:Name="BackgroundChecked"
                            Background="{StaticResource BtnPressFill}"
                            BorderBrush="{StaticResource btnPressBorder}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgoundChecked_Highlight"
                            Background="{StaticResource btnPressFillHighlight}"
                            Margin="1"
                            CornerRadius="2.5"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundOver"
                            Background="{StaticResource BtnOverFill}"
                            BorderBrush="{StaticResource TextBoxPressBrush}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundOver_Highlight"
                            Margin="1"
                            Background="{StaticResource btnOverFillHighlight}"
                            BorderBrush="{StaticResource hoverStroke}"
                            BorderThickness="1,0,1,1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundPressed"
                            Background="{StaticResource BtnPressFill}"
                            BorderBrush="{StaticResource btnPressBorder}"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="BackgoundPressed_Highlight"
                            Background="{StaticResource btnPressFillHighlight}"
                            Margin="1"
                            CornerRadius="2.5"
                            Opacity="0" />
                        <Border
                            x:Name="Background_overlay"
                            Margin="1,0,1,0"
                            BorderThickness="1"
                            CornerRadius="3,3,0,0">
                            <Border.Background>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.157" />
                                    <GradientStop
                                        Color="#72FFFFFF"
                                        Offset="0.5" />
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="0.51" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#FFF1F1F1"
                            BorderBrush="#FFB2B2B2"
                            BorderThickness="1"
                            CornerRadius="3"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                        <TextBlock
                            Canvas.ZIndex="1"
                            x:Name="DisabledOverlay"
                            Text="{TemplateBinding Content}"
                            Foreground="#FF8E96A2"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="FocusVisualElement"
                            Margin="1"
                            BorderBrush="{StaticResource btnFocus}"
                            BorderThickness="1"
                            CornerRadius="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="HyperlinkButton">
        <Setter
            Property="Foreground"
            Value="{StaticResource treeviewArrowUnchecked}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Cursor"
            Value="Hand" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="HyperlinkButton">
                    <Grid
                        Cursor="{TemplateBinding Cursor}"
                        Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="MouseOverText"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="PressedText"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledOverlay"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed" />
                        <TextBlock
                            x:Name="NormalText"
                            Text="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Foreground="{TemplateBinding Foreground}"
                            Margin="{TemplateBinding Padding}" />
                        <TextBlock
                            x:Name="MouseOverText"
                            Text="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            TextDecorations="Underline"
                            Foreground="{TemplateBinding Foreground}"
                            Margin="{TemplateBinding Padding}"
                            Opacity="0" />
                        <TextBlock
                            x:Name="PressedText"
                            Text="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            TextDecorations="Underline"
                            Foreground="{StaticResource hyperlinkPress}"
                            Margin="{TemplateBinding Padding}"
                            Opacity="0" />
                        <TextBlock
                            Canvas.ZIndex="1"
                            x:Name="DisabledOverlay"
                            Text="{TemplateBinding Content}"
                            Foreground="#FF8E96A2"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="FocusVisualElement"
                            Stroke="{StaticResource hyperlinkPress}"
                            StrokeThickness="1"
                            Opacity=".65"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="CheckBox">
        <Setter
            Property="Foreground"
            Value="{StaticResource OutsideFontColor}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="Padding"
            Value="4,1,0,0" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="CheckBox">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="16" />
                            <ColumnDefinition
                                Width="*" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BoxOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="Background_Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BoxPress"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="Background_Press"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CheckStates">
                                <VisualState
                                    x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CheckIcon"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unchecked">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="IndeterminateIcon"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusedVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top">
                            <Rectangle
                                x:Name="Background"
                                Margin="1"
                                Width="13"
                                Height="13"
                                Fill="#FFF4F4F4"
                                Stroke="#FF868686"
                                StrokeThickness="1" />
                            <Rectangle
                                x:Name="Background_Over"
                                Width="13"
                                Height="13"
                                Fill="{StaticResource checkOverFill}"
                                Stroke="{StaticResource checkOverStroke}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Rectangle
                                x:Name="Background_Press"
                                Width="13"
                                Height="13"
                                Fill="{StaticResource checkPressFill}"
                                Stroke="{StaticResource btnPressStroke2}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Rectangle
                                x:Name="BoxFill"
                                Width="9"
                                Height="9"
                                Fill="#FFCACFD5"
                                StrokeThickness="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush
                                        EndPoint="0.8,0.8"
                                        StartPoint="0.3,0.3">
                                        <GradientStop
                                            Color="#FFB3B8BD" />
                                        <GradientStop
                                            Color="#FFE0E0E0"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Rectangle
                                x:Name="BoxOver"
                                Margin="3"
                                Width="9"
                                Height="9"
                                Fill="{StaticResource checkInnerOverFill}"
                                Stroke="{StaticResource checkInnerOverStroke}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Rectangle
                                x:Name="BoxPress"
                                Width="9"
                                Height="9"
                                Fill="{StaticResource checkInnerPressFill}"
                                Stroke="{StaticResource checkInnerPressStroke}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Rectangle
                                x:Name="BoxGradient"
                                Width="7"
                                Height="7"
                                StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush
                                        StartPoint="0.238,0.228"
                                        EndPoint="0.752,0.749">
                                        <GradientStop
                                            Color="#00F6F6F6"
                                            Offset="0.254" />
                                        <GradientStop
                                            Color="#53F8F8F8"
                                            Offset="0.54" />
                                        <GradientStop
                                            Color="#BFFFFFFF"
                                            Offset="0.996" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle
                                x:Name="IndeterminateIcon"
                                Width="5"
                                Height="2"
                                Fill="{StaticResource checkIconStroke}"
                                Opacity=".90"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="Collapsed" />
                            <Path
                                x:Name="CheckIcon"
                                Margin="0,3.333,3.833,0"
                                Width="7"
                                Height="9"
                                Fill="{StaticResource checkIconStroke}"
                                Stretch="Fill"
                                Opacity=".90"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Right"
                                Data="M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z"
                                Visibility="Collapsed" />
                            <Rectangle
                                x:Name="FocusedVisualElement"
                                Stroke="{StaticResource btnFocus}"
                                StrokeThickness="1"
                                Visibility="Collapsed" />
                            <Rectangle
                                x:Name="DisabledVisualElement"
                                Margin="1"
                                Fill="#4CFFFFFF"
                                Visibility="Collapsed" />
                            <Border
                                x:Name="ValidationErrorElement"
                                Visibility="Collapsed"
                                BorderBrush="#FFDB000C"
                                BorderThickness="1"
                                CornerRadius="7">
                                <ToolTipService.ToolTip>
                                    <ToolTip
                                        x:Name="validationTooltip"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                        Template="{StaticResource ValidationToolTipTemplate}"
                                        Placement="Right"
                                        PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <ToolTip.Triggers>
                                            <EventTrigger
                                                RoutedEvent="Canvas.Loaded">
                                                <BeginStoryboard>
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames
                                                            Storyboard.TargetName="validationTooltip"
                                                            Storyboard.TargetProperty="IsHitTestVisible">
                                                            <DiscreteObjectKeyFrame
                                                                KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <sys:Boolean>true</sys:Boolean>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </BeginStoryboard>
                                            </EventTrigger>
                                        </ToolTip.Triggers>
                                    </ToolTip>
                                </ToolTipService.ToolTip>
                                <Grid
                                    Height="12"
                                    HorizontalAlignment="Right"
                                    Margin="1,-4,-4,0"
                                    VerticalAlignment="Top"
                                    Width="12"
                                    Background="Transparent">
                                    <Path
                                        Fill="#FFDC000C"
                                        Margin="1,3,0,0"
                                        Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                    <Path
                                        Fill="#ffffff"
                                        Margin="1,3,0,0"
                                        Data="M 0,0 L2,0 L 8,6 L8,8" />
                                </Grid>
                            </Border>

                        </Grid>
                        <ContentPresenter
                            Grid.Column="1"
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="RadioButton">
        <Setter
            Property="Foreground"
            Value="{StaticResource OutsideFontColor}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="Padding"
            Value="4,1,0,0" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="RadioButton">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="16" />
                            <ColumnDefinition
                                Width="*" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1000000"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1000000"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="CircleOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:03"
                                            Duration="00:00:06"
                                            Storyboard.TargetName="CheckIconOver"
                                            Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundPress"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="CircleFillPress"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="CircleIconPress"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CheckStates">
                                <VisualState
                                    x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="00:00:00.001"
                                            Storyboard.TargetName="CircleIcon"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="00:00:00"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="00:00:06"
                                            Storyboard.TargetName="CheckIconOver"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="00:00:01"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="00:00:00.001"
                                            Storyboard.TargetName="CircleIconPress"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="00:00:00"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="00:00:00.001"
                                            Storyboard.TargetName="FocusedVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="00:00:00"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top">
                            <Ellipse
                                x:Name="Background"
                                Width="14"
                                Height="14"
                                Fill="#FFF4F4F4"
                                Stroke="#FF6F6F6F"
                                StrokeThickness="1" />
                            <Ellipse
                                x:Name="BackgroundOver"
                                Width="14"
                                Height="14"
                                Fill="{StaticResource checkOverFill}"
                                Stroke="{StaticResource checkOverStroke}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Ellipse
                                x:Name="BackgroundPress"
                                Width="14"
                                Height="14"
                                Fill="{StaticResource checkPressFill}"
                                Stroke="{StaticResource btnPressStroke2}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Ellipse
                                x:Name="CircleFill"
                                Margin="2"
                                Fill="#FFCACFD5"
                                StrokeThickness="1">
                                <Ellipse.Stroke>
                                    <LinearGradientBrush
                                        EndPoint="0.8,0.8"
                                        StartPoint="0.3,0.3">
                                        <GradientStop
                                            Color="#FFB3B8BD"
                                            Offset="0" />
                                        <GradientStop
                                            Color="#FFE0E0E0"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                            </Ellipse>
                            <Ellipse
                                x:Name="CircleOver"
                                Margin="2"
                                Fill="{StaticResource checkInnerOverFill}"
                                Stroke="{StaticResource checkInnerOverStroke}"
                                StrokeThickness="1"
                                Opacity="0" />
                            <Ellipse
                                x:Name="CircleFillPress"
                                Margin="2"
                                Fill="{StaticResource checkInnerPressFill}"
                                Stroke="{StaticResource checkInnerPressStroke}"
                                StrokeThickness="1"
                                Opacity="0"
                                Visibility="Visible" />
                            <Ellipse
                                x:Name="CircleGradient"
                                Margin="3"
                                StrokeThickness="1">
                                <Ellipse.Fill>
                                    <LinearGradientBrush
                                        EndPoint="0.8,0.8"
                                        StartPoint="0.3,0.3">
                                        <GradientStop
                                            Color="#00F6F6F6"
                                            Offset="0" />
                                        <GradientStop
                                            Color="#53F8F8F8"
                                            Offset="0.3" />
                                        <GradientStop
                                            Color="#BFFFFFFF"
                                            Offset="1" />
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Ellipse
                                x:Name="CircleIcon"
                                Margin="3"
                                Fill="{StaticResource radioIconFill}"
                                Stroke="{StaticResource radioIconStroke}"
                                StrokeThickness="1.25"
                                Visibility="Collapsed" />
                            <Ellipse
                                x:Name="CheckIconOver"
                                Margin="3"
                                Fill="{StaticResource radioIconFillOver}"
                                Stroke="{StaticResource radioIconStroke}"
                                StrokeThickness="1.25"
                                Opacity="0"
                                Visibility="Collapsed" />
                            <Ellipse
                                x:Name="CircleIconPress"
                                Margin="3"
                                Fill="{StaticResource radioIconFillPress}"
                                Stroke="{StaticResource radioIconStroke}"
                                StrokeThickness="1.25"
                                Opacity="0"
                                Visibility="Collapsed" />
                            <Ellipse
                                x:Name="DisabledVisualElement"
                                Width="14"
                                Height="14"
                                Fill="#FFFFFFFF"
                                Stroke="#FFFFFFFF"
                                Opacity="0.35"
                                Visibility="Collapsed" />
                            <Ellipse
                                x:Name="FocusedVisualElement"
                                Margin="-1"
                                Width="16"
                                Height="16"
                                Stroke="{StaticResource btnFocus}"
                                StrokeThickness="1"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                            <Border
                                x:Name="ValidationErrorElement"
                                Visibility="Collapsed"
                                BorderBrush="#FFDB000C"
                                BorderThickness="1"
                                CornerRadius="7">
                                <ToolTipService.ToolTip>
                                    <ToolTip
                                        x:Name="validationTooltip"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                        Template="{StaticResource ValidationToolTipTemplate}"
                                        Placement="Right"
                                        PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                        <ToolTip.Triggers>
                                            <EventTrigger
                                                RoutedEvent="Canvas.Loaded">
                                                <BeginStoryboard>
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames
                                                            Storyboard.TargetName="validationTooltip"
                                                            Storyboard.TargetProperty="IsHitTestVisible">
                                                            <DiscreteObjectKeyFrame
                                                                KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <sys:Boolean>true</sys:Boolean>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </BeginStoryboard>
                                            </EventTrigger>
                                        </ToolTip.Triggers>
                                    </ToolTip>
                                </ToolTipService.ToolTip>
                                <Grid
                                    Height="12"
                                    HorizontalAlignment="Right"
                                    Margin="1,-4,-4,0"
                                    VerticalAlignment="Top"
                                    Width="12"
                                    Background="Transparent">
                                    <Path
                                        Fill="#FFDC000C"
                                        Margin="1,3,0,0"
                                        Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                    <Path
                                        Fill="#ffffff"
                                        Margin="1,3,0,0"
                                        Data="M 0,0 L2,0 L 8,6 L8,8" />
                                </Grid>
                            </Border>

                        </Grid>
                        <ContentPresenter
                            Grid.Column="1"
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controlsPrimitives:CalendarButton">
        <Setter
            Property="FontSize"
            Value="11" />
        <Setter
            Property="MinWidth"
            Value="40" />
        <Setter
            Property="MinHeight"
            Value="35" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.55" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.55" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.85" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Active" />
                                <VisualState
                                    x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation
                                            Duration="0"
                                            Storyboard.TargetName="selectedText"
                                            Storyboard.TargetProperty="Color"
                                            To="#FF848484" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CalendarButtonFocusVisualDot"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CalendarButtonFocusVisual"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="Background"
                            Fill="{StaticResource calendarBtnFill}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="SelectedBackground"
                            Fill="{StaticResource calendarBtnFill}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="gradientOverlay"
                            Margin="1"
                            RadiusX="2"
                            RadiusY="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#A4FFFFFF" />
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <ContentControl
                            x:Name="NormalText"
                            FontSize="{TemplateBinding FontSize}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsTabStop="False">
                            <ContentControl.Foreground>
                                <SolidColorBrush
                                    x:Name="selectedText"
                                    Color="#FF000000" />
                            </ContentControl.Foreground>
                        </ContentControl>
                        <Rectangle
                            x:Name="CalendarButtonFocusVisual"
                            Stroke="{StaticResource selectedStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="CalendarButtonFocusVisualDot"
                            Margin="1"
                            Stroke="#FF000000"
                            StrokeDashArray="1,1.5"
                            RadiusX="2"
                            RadiusY="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controlsPrimitives:CalendarDayButton">
        <Setter
            Property="FontSize"
            Value="10" />
        <Setter
            Property="MinWidth"
            Value="5" />
        <Setter
            Property="MinHeight"
            Value="5" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarDayButton">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".55" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".55" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="NormalText"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".35" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.85" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DayButtonFocusVisualDot"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DayButtonFocusVisual"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Active" />
                                <VisualState
                                    x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation
                                            Duration="0"
                                            Storyboard.TargetName="selectedText"
                                            Storyboard.TargetProperty="Color"
                                            To="#FF848484" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="DayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="RegularDay" />
                                <VisualState
                                    x:Name="Today">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="selectedText"
                                            Storyboard.TargetProperty="(SolidColorBrush.Color)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource Calendar}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="TodayBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".70" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="BlackoutDayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="NormalDay" />
                                <VisualState
                                    x:Name="BlackoutDay">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="Blackout"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="Background"
                            Fill="{StaticResource calendarBtnFill}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="SelectedBackground"
                            Fill="{StaticResource calendarBtnFill}"
                            Stroke="{StaticResource hoverStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                        <Rectangle
                            x:Name="gradientOverlay"
                            Margin="1"
                            RadiusX="2"
                            RadiusY="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#A4FFFFFF" />
                                    <GradientStop
                                        Color="#00FFFFFF"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <ContentControl
                            x:Name="NormalText"
                            Margin="5,0,5,0"
                            FontSize="{TemplateBinding FontSize}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsTabStop="False">
                            <ContentControl.Foreground>
                                <SolidColorBrush
                                    x:Name="selectedText"
                                    Color="#FF000000" />
                            </ContentControl.Foreground>
                        </ContentControl>
                        <Path
                            x:Name="Blackout"
                            Margin="3"
                            Fill="#FF848484"
                            Stretch="Fill"
                            Opacity="0.45"
                            Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="DayButtonFocusVisual"
                            Stroke="{StaticResource selectedStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="DayButtonFocusVisualDot"
                            Margin="1"
                            Stroke="#FF000000"
                            StrokeDashArray="1,1.5"
                            RadiusX="2"
                            RadiusY="2"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="TodayBackground"
                            Stroke="{StaticResource calendarTodayStroke}"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controlsPrimitives:CalendarItem">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarItem">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisual"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0">
                            <Grid
                                Margin="0,0,0,10">
                                <Grid.Resources>
                                    <ControlTemplate
                                        x:Key="PreviousButtonTemplate"
                                        TargetType="Button">
                                        <Grid
                                            Cursor="Hand">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup
                                                    x:Name="CommonStates">
                                                    <VisualState
                                                        x:Name="Normal" />
                                                    <VisualState
                                                        x:Name="MouseOver">
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames
                                                                Duration="0"
                                                                Storyboard.TargetName="OverColor"
                                                                Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                <DiscreteObjectKeyFrame
                                                                    KeyTime="0"
                                                                    Value="Visible" />
                                                            </ObjectAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState
                                                        x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation
                                                                Duration="0"
                                                                Storyboard.TargetName="NormColor"
                                                                Storyboard.TargetProperty="Opacity"
                                                                To="0.5" />
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Grid
                                                x:Name="NormColor">
                                                <Path
                                                    Width="4"
                                                    Height="8"
                                                    Fill="#FF000000"
                                                    Data="M288.75,232.25 L288.75,240.625 L283,236.625 z"
                                                    Stretch="Fill" />
                                                <Rectangle
                                                    x:Name="HitTarget"
                                                    Width="18"
                                                    Height="18"
                                                    Fill="#00FFFFFF" />
                                            </Grid>
                                            <Grid
                                                x:Name="OverColor"
                                                Visibility="Collapsed">
                                                <Path
                                                    Width="4"
                                                    Height="8"
                                                    Fill="{StaticResource calendarTodayStroke}"
                                                    Data="M288.75,232.25 L288.75,240.625 L283,236.625 z"
                                                    Stretch="Fill" />
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate
                                        x:Key="NextButtonTemplate"
                                        TargetType="Button">
                                        <Grid
                                            Cursor="Hand">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup
                                                    x:Name="CommonStates">
                                                    <VisualState
                                                        x:Name="Normal" />
                                                    <VisualState
                                                        x:Name="MouseOver">
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames
                                                                Duration="0"
                                                                Storyboard.TargetName="OverColor"
                                                                Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                <DiscreteObjectKeyFrame
                                                                    KeyTime="0"
                                                                    Value="Visible" />
                                                            </ObjectAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState
                                                        x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation
                                                                Duration="0"
                                                                Storyboard.TargetName="NormColor"
                                                                Storyboard.TargetProperty="Opacity"
                                                                To="0.5" />
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Grid
                                                x:Name="NormColor">
                                                <Path
                                                    Width="4"
                                                    Height="8"
                                                    Fill="#FF000000"
                                                    Data="M282.875,231.875 L282.875,240.375 L288.625,236 z"
                                                    Stretch="Fill" />
                                                <Rectangle
                                                    x:Name="HitTarget"
                                                    Width="18"
                                                    Height="18"
                                                    Fill="#00FFFFFF" />
                                            </Grid>
                                            <Grid
                                                x:Name="OverColor"
                                                Visibility="Collapsed">
                                                <Path
                                                    Width="4"
                                                    Height="8"
                                                    Fill="{StaticResource calendarTodayStroke}"
                                                    Data="M282.875,231.875 L282.875,240.375 L288.625,236 z"
                                                    Stretch="Fill" />
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate
                                        x:Key="HeaderButtonTemplate"
                                        TargetType="Button">
                                        <Grid
                                            Cursor="Hand"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup
                                                    x:Name="CommonStates">
                                                    <VisualState
                                                        x:Name="Normal" />
                                                    <VisualState
                                                        x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimation
                                                                Duration="0"
                                                                Storyboard.TargetName="buttonContent_Over"
                                                                Storyboard.TargetProperty="Opacity"
                                                                To="1" />
                                                            <DoubleAnimation
                                                                Duration="0"
                                                                Storyboard.TargetName="buttonContent"
                                                                Storyboard.TargetProperty="Opacity"
                                                                To="0" />
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState
                                                        x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation
                                                                Duration="0"
                                                                Storyboard.TargetName="buttonContent"
                                                                Storyboard.TargetProperty="Opacity"
                                                                To="0.5" />
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <ContentControl
                                                x:Name="buttonContent"
                                                FontSize="11"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                IsTabStop="False" />
                                            <ContentControl
                                                x:Name="buttonContent_Over"
                                                Foreground="{StaticResource calendarTodayStroke}"
                                                FontSize="11"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                IsTabStop="False" />
                                        </Grid>
                                    </ControlTemplate>
                                    <DataTemplate
                                        x:Name="DayTitleTemplate">
                                        <StackPanel
                                            Orientation="Vertical">
                                            <TextBlock
                                                Text="{Binding}"
                                                FontSize="11"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Rectangle
                                                Height="1"
                                                Fill="#26848484"
                                                Stretch="Fill" />
                                        </StackPanel>
                                    </DataTemplate>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="Auto" />
                                    <ColumnDefinition
                                        Width="Auto" />
                                    <ColumnDefinition
                                        Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition
                                        Height="Auto" />
                                    <RowDefinition
                                        Height="*" />
                                    <RowDefinition
                                        Height="Auto" />
                                </Grid.RowDefinitions>
                                <Button
                                    x:Name="PreviousButton"
                                    Margin="6,6,0,0"
                                    Width="18"
                                    HorizontalAlignment="Left"
                                    Template="{StaticResource PreviousButtonTemplate}"
                                    Visibility="Collapsed" />
                                <Button
                                    x:Name="HeaderButton"
                                    Margin="0,6,0,0"
                                    Grid.Column="1"
                                    HorizontalAlignment="Center"
                                    Template="{StaticResource HeaderButtonTemplate}" />
                                <Button
                                    x:Name="NextButton"
                                    Margin="0,6,6,0"
                                    Grid.Column="2"
                                    Width="18"
                                    HorizontalAlignment="Right"
                                    Template="{StaticResource NextButtonTemplate}"
                                    Visibility="Collapsed" />
                                <Grid
                                    x:Name="MonthView"
                                    Margin="7,5,6,0"
                                    Grid.Row="1"
                                    Grid.ColumnSpan="3"
                                    HorizontalAlignment="Center"
                                    Visibility="Collapsed">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                    </Grid.RowDefinitions>
                                </Grid>
                                <Grid
                                    x:Name="YearView"
                                    Margin="7,5,7,2"
                                    Grid.Row="1"
                                    Grid.ColumnSpan="3"
                                    HorizontalAlignment="Center"
                                    Visibility="Collapsed">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="Auto" />
                                    </Grid.RowDefinitions>
                                </Grid>
                            </Grid>
                        </Border>
                        <Rectangle
                            x:Name="DisabledVisual"
                            Fill="#FFCACFD5"
                            Opacity="0.2"
                            Stretch="Fill"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:Calendar">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="BorderBrush"
            Value="#FF8E8F8F" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Foreground"
            Value="#FF000000" />
        <Setter
            Property="Padding"
            Value="0" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:Calendar">
                    <StackPanel
                        x:Name="Root"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top">
                        <controlsPrimitives:CalendarItem
                            x:Name="CalendarItem"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Foreground="{TemplateBinding Foreground}"
                            IsEnabled="True" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="ProgressBar">
        <Setter
            Property="Maximum"
            Value="100" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ProgressBar">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Determinate" />
                                <VisualState
                                    x:Name="Indeterminate">
                                    <Storyboard
                                        RepeatBehavior="Forever">
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="IndeterminateRoot"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DeterminateRoot"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="IndeterminateGradientFill"
                                            Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
                                            <SplineDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:.5"
                                                Value="20" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            Background="#FFB2B7BA"
                            CornerRadius="3" />
                        <Border
                            x:Name="ProgressBarTrack"
                            BorderThickness="1"
                            CornerRadius="3"
                            Opacity="0.825">
                            <Border.Background>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#FFFFFFFF" />
                                    <GradientStop
                                        Color="#FFD8D8D8"
                                        Offset="0.327" />
                                    <GradientStop
                                        Color="#FFDADADA"
                                        Offset="0.488" />
                                    <GradientStop
                                        Color="#FFBEBEBE"
                                        Offset="0.539" />
                                    <GradientStop
                                        Color="#FFD6D6D6"
                                        Offset="0.77" />
                                    <GradientStop
                                        Color="#FFFFFFFF"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.BorderBrush>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#FFBBBBBB"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#FF7E7E7E"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>
                        <Grid
                            x:Name="ProgressBarRootGrid">
                            <Grid
                                x:Name="IndeterminateRoot"
                                Visibility="Collapsed">
                                <Rectangle
                                    x:Name="IndeterminateSolidFill"
                                    Margin="1"
                                    Fill="#FF00C120"
                                    RadiusX="2"
                                    RadiusY="2" />
                                <Rectangle
                                    x:Name="ProgressBarRootGradient"
                                    Margin="1"
                                    RadiusX="1.5"
                                    RadiusY="1.5"
                                    Canvas.ZIndex="1">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFE8FFEC"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#84BDFFC9"
                                                Offset="0.516" />
                                            <GradientStop
                                                Color="#00D6D6D6"
                                                Offset="0.521" />
                                            <GradientStop
                                                Color="#FF7BFF94"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle
                                    x:Name="IndeterminateGradientFill"
                                    Margin="1"
                                    StrokeThickness="1"
                                    RadiusX="2"
                                    RadiusY="2"
                                    Opacity="0.7">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush
                                            EndPoint="0,1"
                                            StartPoint="20,1"
                                            MappingMode="Absolute"
                                            SpreadMethod="Repeat">
                                            <LinearGradientBrush.Transform>
                                                <TransformGroup>
                                                    <TranslateTransform
                                                        X="0" />
                                                    <SkewTransform
                                                        AngleX="-10" />
                                                </TransformGroup>
                                            </LinearGradientBrush.Transform>
                                            <GradientStop
                                                Color="#FF95FFA8"
                                                Offset="0.129" />
                                            <GradientStop
                                                Color="#9159FF76"
                                                Offset="0.304" />
                                            <GradientStop
                                                Color="#0007B324"
                                                Offset="0.498" />
                                            <GradientStop
                                                Color="#8661FF7C"
                                                Offset="0.714" />
                                            <GradientStop
                                                Color="#FF8BFFA1"
                                                Offset="0.949" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                            <Grid
                                x:Name="DeterminateRoot">
                                <Rectangle
                                    x:Name="ProgressBarIndicator"
                                    Margin="1"
                                    RadiusX="1.5"
                                    RadiusY="1.5"
                                    HorizontalAlignment="Left"
                                    Opacity="0.83">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFE4FFDA"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FFBDF4C0"
                                                Offset="0.198" />
                                            <GradientStop
                                                Color="#FF9CEBAB"
                                                Offset="0.516" />
                                            <GradientStop
                                                Color="#FF00C523"
                                                Offset="0.521" />
                                            <GradientStop
                                                Color="#FF00D724"
                                                Offset="0.797" />
                                            <GradientStop
                                                Color="#FF10DC2E"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="Thumb">
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Press"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path
                            x:Name="Base"
                            Stretch="Fill"
                            StrokeLineJoin="Round"
                            Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z">
                            <Path.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Path.Fill>
                        </Path>
                        <Path
                            x:Name="Over"
                            Stretch="Fill"
                            Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z"
                            Opacity="0">
                            <Path.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Path.Fill>
                        </Path>
                        <Path
                            x:Name="Press"
                            Stretch="Fill"
                            Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z"
                            Opacity="0">
                            <Path.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Path.Fill>
                        </Path>
                        <Path
                            x:Name="Highlight"
                            Margin="1"
                            Stretch="Fill"
                            Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z">
                            <Path.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Path.Fill>
                        </Path>
                        <Path
                            x:Name="DisabledVisualElement"
                            Fill="#FFFFFFFF"
                            Stroke="#FFFFFFFF"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            Opacity="0.25"
                            Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Path
                            x:Name="FocusVisualElement"
                            Margin="-1"
                            Stroke="{StaticResource btnFocus}"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            Data="F1 M 0.009766,1.453125 C 0.291016,0.093750 1.509766,0.000000 1.509766,0.000000 L 6.509766,0.000000 C 6.509766,0.000000 7.728516,0.000000 8.009766,1.500000 L 8.009766,11.500000 L 4.988770,15.200195 C 4.197266,15.854492 3.384766,15.166992 3.384766,15.166992 L 0.009766,11.500000 C 0.009766,11.500000 -0.012207,1.560059 0.009766,1.453125 Z"
                            IsHitTestVisible="false"
                            Visibility="Collapsed">
                            <Path.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="Slider">
        <Setter
            Property="Maximum"
            Value="10" />
        <Setter
            Property="Minimum"
            Value="0" />
        <Setter
            Property="Value"
            Value="0" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Slider">
                    <Grid
                        x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate
                                x:Key="RepeatButtonTemplate">
                                <Grid
                                    x:Name="Root"
                                    Background="Transparent"
                                    Opacity="0" />
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="Root"
                                            Storyboard.TargetProperty="(UIElement.Opacity)"
                                            To="0.65" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <!-- Horizontal Template -->
                        <Grid
                            x:Name="HorizontalTemplate">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="*" />
                            </Grid.ColumnDefinitions>

                            <!-- Track Layer -->
                            <Rectangle
                                Margin="5.5,0,5.5,0"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Height="6"
                                RadiusX="3"
                                RadiusY="3">
                                <Rectangle.Fill>
                                    <LinearGradientBrush
                                        EndPoint="0.5,1"
                                        StartPoint="0.5,0">
                                        <GradientStop
                                            Color="#FFB0B0B0"
                                            Offset="0.341" />
                                        <GradientStop
                                            Color="#FFE7EAEA"
                                            Offset="0.346" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton
                                x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton"
                                Grid.Column="0"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="HorizontalThumb"
                                Height="21"
                                Width="11"
                                Grid.Column="1"
                                IsTabStop="True" />
                            <RepeatButton
                                x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton"
                                Grid.Column="2"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                        </Grid>

                        <!-- Vertical Template -->
                        <Grid
                            x:Name="VerticalTemplate"
                            Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="*" />
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="Auto" />
                            </Grid.RowDefinitions>

                            <!-- Track Layer -->
                            <Rectangle
                                Margin="0,5.5,0,5.5"
                                Grid.Row="0"
                                Grid.RowSpan="3"
                                Width="6"
                                RadiusX="3"
                                RadiusY="3">
                                <Rectangle.Fill>
                                    <LinearGradientBrush
                                        EndPoint="1.11,0.5"
                                        StartPoint="0.111,0.5">
                                        <GradientStop
                                            Color="#FFB0B0B0"
                                            Offset="0.304" />
                                        <GradientStop
                                            Color="#FFE7EAEA"
                                            Offset="0.304" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton
                                x:Name="VerticalTrackLargeChangeDecreaseRepeatButton"
                                Grid.Row="2"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="VerticalThumb"
                                Height="21"
                                Width="11"
                                Grid.Row="1"
                                IsTabStop="True"
                                RenderTransformOrigin="0.5,0.5">
                                <Thumb.RenderTransform>
                                    <TransformGroup>
                                        <RotateTransform
                                            Angle="-90" />
                                    </TransformGroup>
                                </Thumb.RenderTransform>
                            </Thumb>
                            <RepeatButton
                                x:Name="VerticalTrackLargeChangeIncreaseRepeatButton"
                                Grid.Row="0"
                                IsTabStop="False"
                                Template="{StaticResource RepeatButtonTemplate}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controlsPrimitives:DatePickerTextBox">
        <Setter
            Property="SelectionBackground"
            Value="{StaticResource TextBackgroundSelection}" />
        <Setter
            Property="SelectionForeground"
            Value="#FFFFFFFF" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:DatePickerTextBox">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.1"
                                        To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ContentElement2"
                                            Storyboard.TargetProperty="(Border.BorderBrush)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource TextBoxOverBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="WatermarkStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unwatermarked" />
                                <VisualState
                                    x:Name="Watermarked">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Watermark"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="ContentElement"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unfocused" />
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="BorderFocus"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="WatermarkContent">
                            <Border
                                x:Name="ContentElement2"
                                Background="{TemplateBinding Background}"
                                BorderBrush="#FFABAEB3"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3,0,0,3">
                                <ContentControl
                                    x:Name="Watermark"
                                    Foreground="#FFB1B5BA"
                                    Padding="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    Content="{TemplateBinding Watermark}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalContentAlignment="Center"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="Center"
                                    IsTabStop="False"
                                    IsHitTestVisible="False"
                                    Opacity="0" />
                            </Border>
                            <Border
                                x:Name="BorderFocus"
                                BorderBrush="{StaticResource TextBoxPressBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3,0,0,3"
                                Visibility="Collapsed" />
                            <Border
                                x:Name="ContentElement"
                                CornerRadius="3,0,0,3"
                                Padding="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="Center" />
                            <Border
                                x:Name="FocusVisual"
                                Margin="-1,-1,-21,-1"
                                BorderBrush="{StaticResource selectedStroke}"
                                BorderThickness="1"
                                CornerRadius="4"
                                IsHitTestVisible="False"
                                Visibility="Collapsed" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:DatePicker">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="SelectionBackground"
            Value="{StaticResource TextBackgroundSelection}" />
        <Setter
            Property="Padding"
            Value="4,0,1,0" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:DatePicker">
                    <Grid>
                        <Grid.Resources>
                            <ControlTemplate
                                x:Key="DropDownButtonTemplate"
                                TargetType="Button">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="0:0:0.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="0:0:0.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0.8" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0.8" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress_Highlight"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Duration="0"
                                                        Storyboard.TargetName="DisabledVisual"
                                                        Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0"
                                                            Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid>
                                        <Border
                                            x:Name="Background"
                                            BorderBrush="#FFABAEB3"
                                            BorderThickness="1"
                                            CornerRadius="0,3,3,0" />
                                        <Border
                                            x:Name="BackgroundGradient"
                                            Margin="1"
                                            Background="{StaticResource grayGradient}"
                                            BorderBrush="#FFFFFFFF"
                                            BorderThickness="1"
                                            CornerRadius="0,2,2,0" />
                                        <Border
                                            x:Name="BackgroundOver"
                                            Background="{StaticResource BtnOverFill}"
                                            BorderBrush="{StaticResource TextBoxPressBrush}"
                                            BorderThickness="1"
                                            CornerRadius="0,3,3,0"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BackgroundPress"
                                            Background="{StaticResource BtnPressFill}"
                                            BorderBrush="{StaticResource btnPressStroke1}"
                                            BorderThickness="1"
                                            CornerRadius="0,3,3,0"
                                            Opacity="0" />
                                        <Border
                                            x:Name="BackgroundPress_Highlight"
                                            Background="{StaticResource ComboTogglePressHighlight}"
                                            Margin="1"
                                            CornerRadius="0,2,2,0"
                                            Opacity="0" />
                                        <Border
                                            x:Name="Overlay"
                                            Margin="1"
                                            CornerRadius="0,2,2,0">
                                            <Border.Background>
                                                <LinearGradientBrush
                                                    EndPoint="0.5,1"
                                                    StartPoint="0.5,0">
                                                    <GradientStop
                                                        Color="#00FFFFFF" />
                                                    <GradientStop
                                                        Color="#72FFFFFF"
                                                        Offset="0.189" />
                                                    <GradientStop
                                                        Color="#72FFFFFF"
                                                        Offset="0.5" />
                                                    <GradientStop
                                                        Color="#00FFFFFF"
                                                        Offset="0.51" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border
                                            x:Name="DisabledVisual"
                                            Background="#FF848484"
                                            CornerRadius="0,3,3,0"
                                            Opacity="0.65"
                                            Visibility="Collapsed" />
                                        <Path
                                            x:Name="BtnArrow"
                                            Width="6"
                                            Height="6"
                                            Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z "
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Stretch="Uniform">
                                            <Path.Fill>
                                                <LinearGradientBrush
                                                    EndPoint="0.5,1"
                                                    StartPoint="0.5,0">
                                                    <GradientStop
                                                        Color="{StaticResource Arrow}"
                                                        Offset="0" />
                                                    <GradientStop
                                                        Color="#FF000000"
                                                        Offset="1" />
                                                </LinearGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <controlsPrimitives:DatePickerTextBox
                            x:Name="TextBox"
                            Margin="0,0,20,0"
                            Height="22"
                            Background="{TemplateBinding Background}"
                            SelectionBackground="{TemplateBinding SelectionBackground}"
                            BorderThickness="1,1,0,1"
                            Foreground="{TemplateBinding Foreground}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
                        <Button
                            x:Name="Button"
                            Width="20"
                            Height="22"
                            Template="{StaticResource DropDownButtonTemplate}"
                            HorizontalAlignment="Right" />
                        <Rectangle
                            x:Name="DisabledVisualElement"
                            Fill="#A5FFFFFF"
                            RadiusX="3"
                            RadiusY="3"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Popup
                            x:Name="Popup"
                            Margin="0,0,-1,0"
                            VerticalAlignment="Bottom" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:TabItem">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Padding"
            Value="10,6,10,6" />
        <Setter
            Property="MinWidth"
            Value="5" />
        <Setter
            Property="MinHeight"
            Value="5" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:TabItem">
                    <Grid
                        x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.1"
                                        To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="LeftUnselectedOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="RightUnselectedOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BottomUnselectedOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="TopUnselectedOver"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualBottomSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualBottomUnSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualLeftSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualLeftUnSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualRightSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualRightUnSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualTopSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualTopUnSelected"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused" />
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="TemplateTopSelected"
                            Margin="-2,0,-2,0"
                            Canvas.ZIndex="1"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="BackgroundTop"
                                    Background="#FFFFFFFF"
                                    BorderThickness="3,3,3,0"
                                    CornerRadius="3"
                                    Padding="2,0,2,2"
                                    Margin="0,0,0,-4">
                                    <Border.BorderBrush>
                                        <SolidColorBrush
                                            Color="{StaticResource Arrow}" />
                                    </Border.BorderBrush>
                                </Border>
                                <ContentControl
                                    x:Name="HeaderTopSelected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False"
                                    FontWeight="Bold">
                                    <ContentControl.Foreground>
                                        <SolidColorBrush
                                            Color="{StaticResource Arrow}" />
                                    </ContentControl.Foreground>
                                </ContentControl>
                            </Grid>
                            <Border
                                x:Name="DisabledVisualTopSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed"
                                CornerRadius="3" />
                        </Grid>
                        <Grid
                            x:Name="TemplateTopUnselected"
                            Margin="0,2,0,1"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="TopUnselected_Background"
                                    BorderThickness="3,3,3,0"
                                    Background="{StaticResource BtnOverFill}"
                                    CornerRadius="3"
                                    Padding="3"
                                    Margin="0,0,0,-4">
                                    <Border.BorderBrush>
                                        <SolidColorBrush
                                            Color="{StaticResource Arrow}" />
                                    </Border.BorderBrush>
                                </Border>
                                <Border
                                    x:Name="TopUnselectedOver"
                                    Background="{StaticResource BtnOverFill}"
                                    BorderBrush="{StaticResource TabOverStroke}"
                                    BorderThickness="3,3,3,0"
                                    Opacity="0"
                                    CornerRadius="3"
                                    Padding="3"
                                    Margin="0,0,0,-3" />
                                <Border
                                    x:Name="TopUnselected_Highlight"
                                    Margin="1,1,1,-4"
                                    BorderBrush="#FFFFFFFF"
                                    BorderThickness="3,3,3,0"
                                    CornerRadius="3"
                                    Padding="3" />
                                <ContentControl
                                    x:Name="HeaderTopUnselected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False">
                                    <ContentControl.Foreground>
                                        <SolidColorBrush
                                            Color="{StaticResource Arrow}" />
                                    </ContentControl.Foreground>
                                </ContentControl>
                            </Grid>
                            <Border
                                x:Name="DisabledVisualTopUnSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed"
                                CornerRadius="3" />
                        </Grid>
                        <Grid
                            x:Name="TemplateBottomSelected"
                            Margin="-2,0,-2,0"
                            Canvas.ZIndex="1"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="BackgroundBottom"
                                    Background="#FFFFFFFF"
                                    BorderBrush="#FF979AA2"
                                    BorderThickness="1,0,1,1" />
                                <ContentControl
                                    x:Name="HeaderBottomSelected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualBottomSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                        <Grid
                            x:Name="TemplateBottomUnselected"
                            Margin="0,1,0,2"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="BottomUnselected_Background"
                                    BorderBrush="#FF94979F"
                                    BorderThickness="1,0,1,1">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="0.5,0"
                                            StartPoint="0.5,1">
                                            <GradientStop
                                                Color="#FFFFFFFF"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0.152" />
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0.456" />
                                            <GradientStop
                                                Color="#FFEBEBEB"
                                                Offset="0.465" />
                                            <GradientStop
                                                Color="#FFD6D6D5"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border
                                    x:Name="BottomUnselectedOver"
                                    Background="{StaticResource BtnOverFill}"
                                    BorderBrush="{StaticResource TabOverStroke}"
                                    BorderThickness="1,1,1,0"
                                    Opacity="0"
                                    RenderTransformOrigin="0.5,0.5">
                                    <Border.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform
                                                ScaleY="-1" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Border.RenderTransform>
                                </Border>
                                <Border
                                    x:Name="BottomUnselected_Highlight"
                                    Margin="1"
                                    BorderBrush="#FFFFFFFF"
                                    BorderThickness="1,0,1,1" />
                                <ContentControl
                                    x:Name="HeaderBottomUnselected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualBottomUnSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                        <Grid
                            x:Name="TemplateLeftSelected"
                            Margin="0,-2,0,-2"
                            Canvas.ZIndex="1"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="BackgroundLeft"
                                    Background="#FFFFFFFF"
                                    BorderBrush="#FF979AA2"
                                    BorderThickness="1,1,0,1" />
                                <ContentControl
                                    x:Name="HeaderLeftSelected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualLeftSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                        <Grid
                            x:Name="TemplateLeftUnselected"
                            Margin="2,0,1,0"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="LeftUnselected_Background"
                                    BorderBrush="#FF94979F"
                                    BorderThickness="1,1,0,1">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="1,0.5"
                                            StartPoint="0,0.5">
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0.438" />
                                            <GradientStop
                                                Color="#FFEBEBEB"
                                                Offset="0.585" />
                                            <GradientStop
                                                Color="#FFD6D6D5"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border
                                    x:Name="LeftUnselectedOver"
                                    Background="{StaticResource VTabOverGradient}"
                                    BorderBrush="{StaticResource TabOverStroke}"
                                    BorderThickness="1,1,0,1"
                                    Opacity="0"
                                    RenderTransformOrigin="0.5,0.5" />
                                <ContentControl
                                    x:Name="HeaderLeftUnselected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                                <Border
                                    x:Name="LeftUnselectedOver_Highlight"
                                    Margin="1"
                                    BorderBrush="#FFFFFFFF"
                                    BorderThickness="1,1,0,1" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualLeftUnSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                        <Grid
                            x:Name="TemplateRightSelected"
                            Margin="0,-2,0,-2"
                            Canvas.ZIndex="1"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="BackgroundRight"
                                    Background="#FFFFFFFF"
                                    BorderBrush="#FF979AA2"
                                    BorderThickness="0,1,1,1" />
                                <ContentControl
                                    x:Name="HeaderRightSelected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualRightSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                        <Grid
                            x:Name="TemplateRightUnselected"
                            Margin="1,0,2,0"
                            Visibility="Collapsed">
                            <Grid>
                                <Border
                                    x:Name="RightUnselected_Background"
                                    BorderBrush="#FF94979F"
                                    BorderThickness="0,1,1,1">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="0,0.5"
                                            StartPoint="1,0.5">
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FFF3F3F3"
                                                Offset="0.438" />
                                            <GradientStop
                                                Color="#FFEBEBEB"
                                                Offset="0.585" />
                                            <GradientStop
                                                Color="#FFD6D6D5"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border
                                    x:Name="RightUnselectedOver"
                                    Background="{StaticResource VTabOverGradient}"
                                    BorderBrush="{StaticResource TabOverStroke}"
                                    BorderThickness="1,1,0,1"
                                    Opacity="0"
                                    RenderTransformOrigin="0.5,0.5">
                                    <Border.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform
                                                ScaleX="-1" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Border.RenderTransform>
                                </Border>
                                <ContentControl
                                    x:Name="HeaderRightUnselected"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    IsTabStop="False" />
                                <Border
                                    x:Name="RightUnselected_Highlight"
                                    Margin="1"
                                    BorderBrush="#FFFFFFFF"
                                    BorderThickness="0,1,1,1" />
                            </Grid>
                            <Border
                                x:Name="DisabledVisualRightUnSelected"
                                Background="#8CFFFFFF"
                                IsHitTestVisible="false"
                                Visibility="Collapsed" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:TabControl">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Padding"
            Value="5" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:TabControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualTop"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualBottom"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualLeft"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualRight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="TemplateTop"
                            Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="*" />
                            </Grid.RowDefinitions>
                            <controlsPrimitives:TabPanel
                                x:Name="TabPanelTop"
                                Margin="2,0,2,-3"
                                Canvas.ZIndex="1" />
                            <Border
                                Grid.Row="1"
                                MinHeight="10"
                                MinWidth="10"
                                Background="#FFFFFFFF"
                                CornerRadius="5"
                                BorderThickness="3">
                                <Border.BorderBrush>
                                    <SolidColorBrush
                                        Color="{StaticResource Arrow}" />
                                </Border.BorderBrush>
                                <ContentPresenter
                                    x:Name="ContentTop"
                                    Margin="{TemplateBinding Padding}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border
                                x:Name="DisabledVisualTop"
                                Grid.Row="1"
                                Grid.RowSpan="2"
                                Background="#8CFFFFFF"
                                CornerRadius="1"
                                Canvas.ZIndex="1"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        </Grid>
                        <Grid
                            x:Name="TemplateBottom"
                            Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="*" />
                                <RowDefinition
                                    Height="Auto" />
                            </Grid.RowDefinitions>
                            <controlsPrimitives:TabPanel
                                x:Name="TabPanelBottom"
                                Margin="2,-1,2,0"
                                Grid.Row="1"
                                Canvas.ZIndex="1" />
                            <Border
                                MinHeight="10"
                                MinWidth="10"
                                Background="#FFFFFFFF"
                                BorderBrush="#FF979AA2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1">
                                <ContentPresenter
                                    x:Name="ContentBottom"
                                    Margin="{TemplateBinding Padding}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border
                                x:Name="DisabledVisualBottom"
                                Background="#8CFFFFFF"
                                CornerRadius="1"
                                Canvas.ZIndex="1"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        </Grid>
                        <Grid
                            x:Name="TemplateLeft"
                            Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto" />
                                <ColumnDefinition
                                    Width="*" />
                            </Grid.ColumnDefinitions>
                            <controlsPrimitives:TabPanel
                                x:Name="TabPanelLeft"
                                Margin="0,2,-1,2"
                                Canvas.ZIndex="1" />
                            <Border
                                MinHeight="10"
                                MinWidth="10"
                                Grid.Column="1"
                                Background="#FFFFFFFF"
                                BorderBrush="#FF979AA2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1">
                                <ContentPresenter
                                    x:Name="ContentLeft"
                                    Margin="{TemplateBinding Padding}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border
                                x:Name="DisabledVisualLeft"
                                Grid.Column="1"
                                Background="#8CFFFFFF"
                                CornerRadius="1"
                                Canvas.ZIndex="1"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        </Grid>
                        <Grid
                            x:Name="TemplateRight"
                            Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="*" />
                                <ColumnDefinition
                                    Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <controlsPrimitives:TabPanel
                                x:Name="TabPanelRight"
                                Margin="-1,2,0,2"
                                Grid.Column="1"
                                Canvas.ZIndex="1" />
                            <Border
                                MinHeight="10"
                                MinWidth="10"
                                Background="#FFFFFFFF"
                                BorderBrush="#FF979AA2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1">
                                <ContentPresenter
                                    x:Name="ContentRight"
                                    Margin="{TemplateBinding Padding}"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border
                                x:Name="DisabledVisualRight"
                                Background="#8CFFFFFF"
                                CornerRadius="1"
                                Canvas.ZIndex="1"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="PasswordBox">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="SelectionBackground"
            Value="{StaticResource TextBackgroundSelection}" />
        <Setter
            Property="SelectionForeground"
            Value="#FFFFFFFF" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="Padding"
            Value="4" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="PasswordBox">
                    <Grid
                        x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="ReadOnly" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Disabled" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ReadOnly">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ReadOnlyVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="BorderBase"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{StaticResource TextBoxNorm}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3" />
                        <Border
                            x:Name="Over"
                            BorderBrush="{StaticResource TextBoxOver}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            Opacity="0" />
                        <Border
                            x:Name="ContentElement"
                            Padding="{TemplateBinding Padding}"
                            BorderThickness="0"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#A5FFFFFF"
                            BorderBrush="#59C0C0C0"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            IsHitTestVisible="False"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="ReadOnlyVisualElement"
                            Background="#66FFFFFF"
                            CornerRadius="3"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="FocusVisualElement"
                            BorderBrush="{StaticResource TextBoxFocus}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            IsHitTestVisible="False"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="ValidationErrorElement"
                            Visibility="Collapsed"
                            BorderBrush="#FFDB000C"
                            BorderThickness="1"
                            CornerRadius="7">
                            <ToolTipService.ToolTip>
                                <ToolTip
                                    x:Name="validationTooltip"
                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                    Template="{StaticResource ValidationToolTipTemplate}"
                                    Placement="Right"
                                    PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger
                                            RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Storyboard.TargetName="validationTooltip"
                                                        Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>true</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid
                                Height="12"
                                HorizontalAlignment="Right"
                                Margin="1,-4,-4,0"
                                VerticalAlignment="Top"
                                Width="12"
                                Background="Transparent">
                                <Path
                                    Fill="#FFDC000C"
                                    Margin="1,3,0,0"
                                    Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path
                                    Fill="#ffffff"
                                    Margin="1,3,0,0"
                                    Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="TextBox">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="SelectionBackground"
            Value="{StaticResource TextBackgroundSelection}" />
        <Setter
            Property="SelectionForeground"
            Value="#FFFFFFFF" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="Padding"
            Value="4" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="TextBox">
                    <Grid
                        x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="ReadOnly" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Disabled" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ReadOnly">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ReadOnlyVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="ValidationErrorElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="validationTooltip"
                                            Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="BorderBase"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{StaticResource TextBoxNorm}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3" />
                        <Border
                            x:Name="Over"
                            BorderBrush="{StaticResource TextBoxOver}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            Opacity="0" />
                        <ScrollViewer
                            x:Name="ContentElement"
                            Padding="{TemplateBinding Padding}"
                            BorderThickness="0"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsTabStop="False" />
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#A5FFFFFF"
                            BorderBrush="#59C0C0C0"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            IsHitTestVisible="False"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="ReadOnlyVisualElement"
                            Background="#66FFFFFF"
                            CornerRadius="3"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="FocusVisualElement"
                            BorderBrush="{StaticResource TextBoxFocus}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3"
                            IsHitTestVisible="False"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="ValidationErrorElement"
                            Visibility="Collapsed"
                            BorderBrush="#FFDB000C"
                            BorderThickness="1"
                            CornerRadius="7">
                            <ToolTipService.ToolTip>
                                <ToolTip
                                    x:Name="validationTooltip"
                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                    Template="{StaticResource ValidationToolTipTemplate}"
                                    Placement="Right"
                                    PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger
                                            RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Storyboard.TargetName="validationTooltip"
                                                        Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>true</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid
                                Height="12"
                                HorizontalAlignment="Right"
                                Margin="1,-4,-4,0"
                                VerticalAlignment="Top"
                                Width="12"
                                Background="Transparent">
                                <Path
                                    Fill="#FFDC000C"
                                    Margin="1,3,0,0"
                                    Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path
                                    Fill="#ffffff"
                                    Margin="1,3,0,0"
                                    Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="inputPrimitivesToolkit:AutoCompleteBox">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Padding"
            Value="4" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="inputPrimitivesToolkit:AutoCompleteBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="PopupStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.1"
                                        To="PopupOpened" />
                                    <VisualTransition
                                        GeneratedDuration="0:0:0.2"
                                        To="PopupClosed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="PopupOpened">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="PopupBorder"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="PopupClosed" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <TextBox
                            x:Name="Text"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Foreground="{TemplateBinding Foreground}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsTabStop="True" />
                        <Popup
                            x:Name="Popup">
                            <Border
                                x:Name="PopupBorder"
                                Opacity="0">
                                <ListBox
                                    x:Name="Selector"
                                    Foreground="{TemplateBinding Foreground}"
                                    BorderBrush="{StaticResource TextBoxNorm}"
                                    ItemTemplate="{TemplateBinding ItemTemplate}"
                                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                    ScrollViewer.VerticalScrollBarVisibility="Auto" />
                            </Border>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:TreeViewItem">
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="Padding"
            Value="5,3,15,3" />
        <Setter
            Property="Cursor"
            Value="Arrow" />
        <Setter
            Property="IsTabStop"
            Value="True" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:TreeViewItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="Header"
                                            Storyboard.TargetProperty="(UIElement.Foreground).(SolidColorBrush.Color)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="#FF999999" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="select_gradient"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="select_highlight"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="SelectedInactive">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="inactive"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".2" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="HasItemsStates">
                                <VisualState
                                    x:Name="HasItems" />
                                <VisualState
                                    x:Name="NoItems">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpansionStates">
                                <VisualState
                                    x:Name="Collapsed" />
                                <VisualState
                                    x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ItemsHost"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition
                                Height="Auto" />
                            <RowDefinition
                                Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition
                                Width="15" />
                            <ColumnDefinition
                                Width="Auto" />
                            <ColumnDefinition
                                Width="*" />
                        </Grid.ColumnDefinitions>
                        <ToggleButton
                            x:Name="ExpanderButton"
                            IsTabStop="False">
                            <ToggleButton.Template>
                                <ControlTemplate
                                    TargetType="ToggleButton">
                                    <Grid
                                        x:Name="Root">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup
                                                x:Name="CommonStates">
                                                <VisualState
                                                    x:Name="Normal" />
                                                <VisualState
                                                    x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames
                                                            Storyboard.TargetName="CheckedVisual"
                                                            Storyboard.TargetProperty="(Path.Fill)">
                                                            <DiscreteObjectKeyFrame
                                                                KeyTime="0"
                                                                Value="{StaticResource treeviewArrowHover}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames
                                                            Storyboard.TargetName="UncheckedVisual"
                                                            Storyboard.TargetProperty="(Path.Fill)">
                                                            <DiscreteObjectKeyFrame
                                                                KeyTime="0"
                                                                Value="{StaticResource treeviewArrowHover}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState
                                                    x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Duration="0"
                                                            Storyboard.TargetName="Root"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To=".7" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup
                                                x:Name="CheckStates">
                                                <VisualState
                                                    x:Name="Unchecked" />
                                                <VisualState
                                                    x:Name="Checked">
                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Duration="0"
                                                            Storyboard.TargetName="UncheckedVisual"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To="0" />
                                                        <DoubleAnimation
                                                            Duration="0"
                                                            Storyboard.TargetName="CheckedVisual"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To="1" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid
                                            HorizontalAlignment="Right"
                                            Margin="2,2,5,2">
                                            <Path
                                                x:Name="UncheckedVisual"
                                                Height="9"
                                                Width="6"
                                                HorizontalAlignment="Right"
                                                VerticalAlignment="Center"
                                                Fill="{StaticResource treeviewArrowUnchecked}"
                                                StrokeLineJoin="Miter"
                                                Data="M 0,0 L 0,9 L 5,4.5 Z" />
                                            <Path
                                                x:Name="CheckedVisual"
                                                Height="6"
                                                Width="6"
                                                HorizontalAlignment="Right"
                                                VerticalAlignment="Center"
                                                Fill="{StaticResource treeviewArrowChecked}"
                                                StrokeLineJoin="Miter"
                                                Opacity="0"
                                                Data="M 6,0 L 6,6 L 0,6 Z" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Rectangle
                            x:Name="select_gradient"
                            Grid.Column="1"
                            Fill="{StaticResource BtnOverFill}"
                            Stroke="{StaticResource selectedStroke}"
                            StrokeThickness="1"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0"
                            IsHitTestVisible="False" />
                        <Rectangle
                            x:Name="select_highlight"
                            Margin="1"
                            Grid.Column="1"
                            Stroke="#A0FFFFFF"
                            Opacity="0" />
                        <Rectangle
                            x:Name="inactive"
                            Grid.Column="1"
                            Fill="#FF999999"
                            Stroke="#FF333333"
                            StrokeThickness="1"
                            RadiusX="2"
                            RadiusY="2"
                            Opacity="0"
                            IsHitTestVisible="False" />
                        <Button
                            x:Name="Header"
                            Grid.Column="1"
                            Foreground="{TemplateBinding Foreground}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            Padding="{TemplateBinding Padding}"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Cursor="{TemplateBinding Cursor}"
                            ClickMode="Hover"
                            IsTabStop="False">
                            <Button.Template>
                                <ControlTemplate
                                    TargetType="Button">
                                    <Grid>
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup
                                                x:Name="CommonStates">
                                                <VisualState
                                                    x:Name="Normal" />
                                                <VisualState
                                                    x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Duration="0"
                                                            Storyboard.TargetName="highlight"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To="0.65" />
                                                        <DoubleAnimationUsingKeyFrames
                                                            BeginTime="00:00:00"
                                                            Duration="00:00:00.0010000"
                                                            Storyboard.TargetName="hover_gradient"
                                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame
                                                                KeyTime="00:00:00"
                                                                Value="1" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState
                                                    x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Duration="0"
                                                            Storyboard.TargetName="content"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To=".55" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Rectangle
                                            x:Name="hover_gradient"
                                            Fill="{StaticResource hoverGradient}"
                                            Stroke="{StaticResource hoverStroke}"
                                            StrokeThickness="1"
                                            RadiusX="2"
                                            RadiusY="2"
                                            Opacity="0"
                                            IsHitTestVisible="False" />
                                        <Rectangle
                                            x:Name="highlight"
                                            Margin="1"
                                            StrokeThickness="1"
                                            RadiusX="1"
                                            RadiusY="1"
                                            Opacity="0"
                                            IsHitTestVisible="False"
                                            Stroke="#FFFFFFFF" />
                                        <ContentPresenter
                                            x:Name="content"
                                            Margin="{TemplateBinding Padding}"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Center"
                                            Cursor="{TemplateBinding Cursor}" />
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <ItemsPresenter
                            x:Name="ItemsHost"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            Grid.Row="1"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controls:TreeView">
        <Setter
            Property="Background"
            Value="Transparent" />
        <Setter
            Property="Foreground"
            Value="{StaticResource OutsideFontColor}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="BorderBrush"
            Value="Transparent" />
        <Setter
            Property="BorderThickness"
            Value="0" />
        <Setter
            Property="Padding"
            Value="4" />
        <Setter
            Property="Cursor"
            Value="Arrow" />
        <Setter
            Property="IsTabStop"
            Value="True" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:TreeView">
                    <Grid
                        x:Name="Root">
                        <Border
                            x:Name="Border"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                            <ScrollViewer
                                x:Name="ScrollViewer"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                HorizontalScrollBarVisibility="Auto"
                                VerticalScrollBarVisibility="Auto">
                                <ItemsPresenter
                                    x:Name="TreeItems" />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="controlsToolkit:Expander">
        <Setter
            Property="Background"
            Value="Transparent" />
        <Setter
            Property="Foreground"
            Value="{StaticResource ButtonFontColor}" />
        <Setter
            Property="FontWeight"
            Value="Bold" />
        <Setter
            Property="Padding"
            Value="4" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsToolkit:Expander">
                    <Grid>
                        <Grid.Resources>
                            <ControlTemplate
                                x:Key="ExpanderDownHeaderTemplate"
                                TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="arrowDown"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unchecked" />
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusBackground"
                                                        Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0"
                                                            Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="HoverBackground"
                                        Fill="{StaticResource hoverGradient}"
                                        Stroke="{StaticResource hoverStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Rectangle.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Grid
                                        Margin="{TemplateBinding Padding}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition
                                                Width="18" />
                                            <ColumnDefinition
                                                Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid
                                            Height="18"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top">
                                            <Ellipse
                                                x:Name="circleOver1"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver2"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver3"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress1"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress2"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress3"
                                                Height="18"
                                                Width="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Path
                                                x:Name="arrowDown"
                                                Stroke="{StaticResource ButtonFontColor}"
                                                StrokeThickness="2"
                                                Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform />
                                                        <SkewTransform />
                                                        <RotateTransform />
                                                        <TranslateTransform />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                        <ContentPresenter
                                            x:Name="header"
                                            Margin="4,0,0,0"
                                            Grid.Column="1"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Center"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                    <Rectangle
                                        x:Name="FocusBackground"
                                        Stroke="{StaticResource selectedStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        IsHitTestVisible="false"
                                        Visibility="Collapsed"
                                        Opacity="0.84" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="ExpanderUpHeaderTemplate"
                                TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="arrowUp"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unchecked" />
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusBackground"
                                                        Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0"
                                                            Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="HoverBackground"
                                        Fill="{StaticResource hoverGradient}"
                                        Stroke="{StaticResource hoverStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Rectangle.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                                    ScaleY="-1" />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Grid
                                        Margin="{TemplateBinding Padding}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition
                                                Width="18" />
                                            <ColumnDefinition
                                                Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid
                                            Height="18"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top">
                                            <Ellipse
                                                x:Name="circleOver1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill1}"
                                                Stroke="#00000000"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Ellipse
                                                x:Name="circleOver2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill2}"
                                                Stroke="#00000000"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Ellipse
                                                x:Name="circleOver3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Ellipse
                                                x:Name="circlePress1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill1}"
                                                Stroke="#00000000"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Ellipse
                                                x:Name="circlePress2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill2}"
                                                Stroke="#00000000"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Ellipse
                                                x:Name="circlePress3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" />
                                            <Path
                                                x:Name="arrowUp"
                                                Stroke="{StaticResource ButtonFontColor}"
                                                StrokeThickness="2"
                                                Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform
                                                            ScaleY="-1" />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                        <ContentPresenter
                                            x:Name="header"
                                            Margin="4,0,0,0"
                                            Grid.Column="1"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Center"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                    <Rectangle
                                        x:Name="FocusBackground"
                                        Stroke="{StaticResource selectedStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        IsHitTestVisible="false"
                                        Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="ExpanderLeftHeaderTemplate"
                                TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="arrowLeft"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="arrowLeft"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-90" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unchecked" />
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress2"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress3"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusBackground"
                                                        Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0"
                                                            Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="HoverBackground"
                                        Fill="{StaticResource hoverGradientVertical}"
                                        Stroke="{StaticResource hoverStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Rectangle.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                                    ScaleX="-1" />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Grid
                                        Margin="{TemplateBinding Padding}">
                                        <Grid.RowDefinitions>
                                            <RowDefinition
                                                Height="18" />
                                            <RowDefinition
                                                Height="*" />
                                        </Grid.RowDefinitions>
                                        <Grid
                                            Width="18"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top">
                                            <Ellipse
                                                x:Name="circleOver1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Path
                                                x:Name="arrowLeft"
                                                Stroke="{StaticResource ButtonFontColor}"
                                                StrokeThickness="2"
                                                Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform />
                                                        <SkewTransform />
                                                        <RotateTransform
                                                            Angle="90" />
                                                        <TranslateTransform />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                        <ContentPresenter
                                            x:Name="header"
                                            Margin="0,4,0,0"
                                            Grid.Row="1"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                    <Rectangle
                                        x:Name="FocusBackground"
                                        Stroke="{StaticResource selectedStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        IsHitTestVisible="false"
                                        Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="ExpanderRightHeaderTemplate"
                                TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="arrowRight"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="90" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="-1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unchecked" />
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver1"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver2"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circleOver3"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress1"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress2"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="circlePress3"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames
                                                        BeginTime="00:00:00"
                                                        Duration="00:00:00.0010000"
                                                        Storyboard.TargetName="HoverBackground"
                                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame
                                                            KeyTime="00:00:00"
                                                            Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusBackground"
                                                        Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame
                                                            KeyTime="0"
                                                            Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle
                                        x:Name="HoverBackground"
                                        Fill="{StaticResource hoverGradientVertical}"
                                        Stroke="{StaticResource hoverStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Rectangle.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Grid
                                        Margin="{TemplateBinding Padding}">
                                        <Grid.RowDefinitions>
                                            <RowDefinition
                                                Height="18" />
                                            <RowDefinition
                                                Height="*" />
                                        </Grid.RowDefinitions>
                                        <Grid
                                            Width="18"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top">
                                            <Ellipse
                                                x:Name="circleOver1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circleOver3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowHoverFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress1"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill1}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress2"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill2}"
                                                Stroke="#00000000"
                                                Opacity="0" />
                                            <Ellipse
                                                x:Name="circlePress3"
                                                Width="18"
                                                Height="18"
                                                Fill="{StaticResource ExpanderArrowPressedFill3}"
                                                Stroke="{StaticResource expanderArrowStroke}"
                                                Opacity="0" />
                                            <Path
                                                x:Name="arrowRight"
                                                Stroke="{StaticResource ButtonFontColor}"
                                                StrokeThickness="2"
                                                Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform />
                                                        <SkewTransform />
                                                        <RotateTransform
                                                            Angle="-90" />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                        <ContentPresenter
                                            x:Name="header"
                                            Margin="0,4,0,0"
                                            Grid.Row="1"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top"
                                            IsHitTestVisible="false" />
                                    </Grid>
                                    <Rectangle
                                        x:Name="FocusBackground"
                                        Stroke="{StaticResource selectedStroke}"
                                        RadiusX="2"
                                        RadiusY="2"
                                        IsHitTestVisible="false"
                                        Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Opacity)"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard />
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Collapsed" />
                                <VisualState
                                    x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd1"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ExpanderUpHeaderTemplate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.5,1" />
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.5,0" />
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ExpanderLeftHeaderTemplate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="1,0.5" />
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0,0.5" />
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ExpanderRightHeaderTemplate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="1"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd1"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0,0.5" />
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame
                                                KeyTime="00:00:00"
                                                Value="1,0.5" />
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto"
                                    x:Name="cd0" />
                                <ColumnDefinition
                                    Width="Auto"
                                    x:Name="cd1" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="Auto"
                                    x:Name="rd0" />
                                <RowDefinition
                                    Height="Auto"
                                    x:Name="rd1" />
                            </Grid.RowDefinitions>
                            <ToggleButton
                                x:Name="ExpanderButton"
                                Grid.Column="0"
                                Grid.Row="0"
                                MinHeight="0"
                                MinWidth="0"
                                Content="{TemplateBinding Header}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                Foreground="{TemplateBinding Foreground}"
                                Padding="{TemplateBinding Padding}"
                                Template="{StaticResource ExpanderDownHeaderTemplate}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                IsChecked="{TemplateBinding IsExpanded}" />
                            <Border
                                x:Name="ExpandSite"
                                Grid.Column="0"
                                Grid.Row="1"
                                Background="#FFFFFFFF"
                                BorderThickness="1"
                                CornerRadius="2"
                                Padding="0"
                                Visibility="Collapsed">
                                <Border.BorderBrush>
                                    <LinearGradientBrush
                                        EndPoint="0.5,1"
                                        StartPoint="0.5,0">
                                        <GradientStop
                                            Color="#FFABAEB3"
                                            Offset="0" />
                                        <GradientStop
                                            Color="#FFE2E8EE"
                                            Offset="0.355" />
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                                <ContentControl
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontStretch="{TemplateBinding FontStretch}"
                                    FontStyle="{TemplateBinding FontStyle}"
                                    FontWeight="{TemplateBinding FontWeight}"
                                    Foreground="{TemplateBinding Foreground}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Border>
                        </Grid>
                        <Border
                            x:Name="DisabledVisualElement"
                            IsHitTestVisible="false"
                            Background="#A5FFFFFF"
                            Opacity="0" />
                        <Border
                            x:Name="FocusVisualElement"
                            IsHitTestVisible="false"
                            BorderBrush="#00FFFFFF"
                            BorderThickness="1"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="inputToolkit:ButtonSpinner">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="inputToolkit:ButtonSpinner">
                    <Grid>
                        <Grid.Resources>
                            <ControlTemplate
                                x:Key="IncreaseButton"
                                TargetType="RepeatButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="Highlight"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress_highlight"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused" />
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border
                                        x:Name="BackgroundOver"
                                        Background="{StaticResource BtnOverFill}"
                                        BorderBrush="{StaticResource TextBoxPressBrush}"
                                        BorderThickness="1"
                                        CornerRadius="0,3,0,0"
                                        Opacity="0" />
                                    <Border
                                        x:Name="Highlight"
                                        Margin="1"
                                        BorderBrush="#FFFFFFFF"
                                        BorderThickness="0.5,0.5,0.5,0"
                                        CornerRadius="0,2,0,0"
                                        Opacity="0" />
                                    <Border
                                        x:Name="BackgroundPress"
                                        Background="{StaticResource BtnPressFill}"
                                        BorderBrush="{StaticResource btnPressStroke2}"
                                        BorderThickness="1"
                                        CornerRadius="0,3,0,0"
                                        Opacity="0" />
                                    <Border
                                        x:Name="BackgroundPress_highlight"
                                        Background="{StaticResource ComboTogglePressHighlight}"
                                        BorderThickness="1"
                                        CornerRadius="0,3,0,0"
                                        Opacity="0" />
                                    <Path
                                        Height="5"
                                        Width="7"
                                        Stretch="Uniform"
                                        Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center">
                                        <Path.Fill>
                                            <LinearGradientBrush
                                                EndPoint="0.5,0"
                                                StartPoint="0.5,1">
                                                <GradientStop
                                                    Color="{StaticResource Arrow2}"
                                                    Offset="0" />
                                                <GradientStop
                                                    Color="#FF000000"
                                                    Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate
                                x:Key="DecreaseButton"
                                TargetType="RepeatButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition
                                                    GeneratedDuration="0" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="MouseOver" />
                                                <VisualTransition
                                                    GeneratedDuration="00:00:00.1"
                                                    To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundOver"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="Highlight"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="BackgroundPress_highlight"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused" />
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border
                                        x:Name="BackgroundOver"
                                        Background="{StaticResource BtnOverFill}"
                                        BorderBrush="{StaticResource TextBoxPressBrush}"
                                        BorderThickness="1"
                                        CornerRadius="0,3,0,0"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Border.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                                    ScaleY="-1" />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Border.RenderTransform>
                                    </Border>
                                    <Border
                                        x:Name="Highlight"
                                        Margin="1"
                                        BorderBrush="#FFFFFFFF"
                                        BorderThickness="0.5,0,0.5,0.5"
                                        CornerRadius="0,0,2,0"
                                        Opacity="0" />
                                    <Border
                                        x:Name="BackgroundPress"
                                        Background="{StaticResource BtnPressFill}"
                                        BorderBrush="{StaticResource btnPressStroke2}"
                                        BorderThickness="1"
                                        CornerRadius="0,3,0,0"
                                        Opacity="0"
                                        RenderTransformOrigin="0.5,0.5">
                                        <Border.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                                    ScaleY="-1" />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Border.RenderTransform>
                                    </Border>
                                    <Border
                                        x:Name="BackgroundPress_highlight"
                                        Background="{StaticResource ComboTogglePressHighlight}"
                                        BorderThickness="1"
                                        CornerRadius="0,0,3,0"
                                        Opacity="0" />
                                    <Path
                                        Height="5"
                                        Width="7"
                                        Stretch="Uniform"
                                        Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center">
                                        <Path.Fill>
                                            <LinearGradientBrush
                                                EndPoint="0.5,1"
                                                StartPoint="0.5,0">
                                                <GradientStop
                                                    Color="{StaticResource Arrow2}"
                                                    Offset="0" />
                                                <GradientStop
                                                    Color="#FF000000"
                                                    Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <RepeatButton
                                x:Name="IncreaseButton"
                                Template="{StaticResource IncreaseButton}"
                                IsTabStop="False"
                                ClickMode="Press" />
                            <ContentPresenter
                                Content="{TemplateBinding Content}"
                                Grid.Row="1" />
                            <RepeatButton
                                x:Name="DecreaseButton"
                                Grid.Row="2"
                                Template="{StaticResource DecreaseButton}"
                                IsTabStop="False"
                                ClickMode="Press" />
                        </Grid>
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#A5FFFFFF"
                            CornerRadius="0,3,3,0"
                            IsHitTestVisible="false"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        TargetType="inputToolkit:NumericUpDown">
        <Setter
            Property="Padding"
            Value="2,3,2,3" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="inputToolkit:NumericUpDown">
                    <Grid
                        MinWidth="50"
                        Height="22">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            Background="#FFFFFFFF"
                            BorderBrush="#FFABAEB3"
                            BorderThickness="1"
                            CornerRadius="3">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="*" />
                                    <ColumnDefinition
                                        Width="15" />
                                </Grid.ColumnDefinitions>
                                <inputToolkit:ButtonSpinner
                                    x:Name="Spinner"
                                    Margin="0,-1,-1,-1"
                                    Grid.Column="1"
                                    IsTabStop="False" />
                                <TextBox
                                    x:Name="Text"
                                    MinWidth="35"
                                    SelectionBackground="{StaticResource TextBackgroundSelection}"
                                    SelectionForeground="#FFFFFFFF"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontStretch="{TemplateBinding FontStretch}"
                                    FontStyle="{TemplateBinding FontStyle}"
                                    FontWeight="{TemplateBinding FontWeight}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Padding="{TemplateBinding Padding}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="Stretch"
                                    TextAlignment="Right"
                                    Text="{TemplateBinding Value}"
                                    TextWrapping="NoWrap"
                                    AcceptsReturn="False">
                                    <TextBox.Template>
                                        <ControlTemplate>
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="MouseBorder"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Duration="0"
                                                                    Storyboard.TargetName="SeparatorOver"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="DisabledVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="ReadOnly">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="ReadOnlyVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="PressBorder"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Duration="0"
                                                                    Storyboard.TargetName="SeparatorPress"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Duration="0"
                                                                    Storyboard.TargetName="FocusVisualElement"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border
                                                    x:Name="ReadOnlyVisualElement"
                                                    Background="#8CF7F7F7"
                                                    IsHitTestVisible="False"
                                                    Opacity="0" />
                                                <ScrollViewer
                                                    x:Name="ContentElement"
                                                    Padding="{TemplateBinding Padding}"
                                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    BorderThickness="0"
                                                    IsTabStop="False" />
                                                <Rectangle
                                                    x:Name="SeparatorOver"
                                                    Margin="0,0,-1,0"
                                                    Width="1"
                                                    Stroke="{StaticResource TextBoxOverBrush}"
                                                    StrokeThickness="0.5"
                                                    HorizontalAlignment="Right"
                                                    IsHitTestVisible="False"
                                                    Visibility="Collapsed" />
                                                <Rectangle
                                                    x:Name="SeparatorPress"
                                                    Margin="0,0,-1,0"
                                                    Width="1"
                                                    Stroke="{StaticResource TextBoxPressBrush}"
                                                    StrokeThickness="0.5"
                                                    HorizontalAlignment="Right"
                                                    IsHitTestVisible="False"
                                                    Visibility="Collapsed" />
                                                <Border
                                                    x:Name="MouseBorder"
                                                    Margin="-1,-1,-16,-1"
                                                    BorderBrush="{StaticResource TextBoxOverBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="3"
                                                    IsHitTestVisible="False"
                                                    Opacity="0" />
                                                <Border
                                                    x:Name="PressBorder"
                                                    Margin="-1,-1,-16,-1"
                                                    BorderBrush="{StaticResource TextBoxPressBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="3"
                                                    IsHitTestVisible="False"
                                                    Opacity="0" />
                                                <Border
                                                    x:Name="DisabledVisualElement"
                                                    Margin="-1,-1,-16,-1"
                                                    Background="#A5F7F7F7"
                                                    CornerRadius="3"
                                                    IsHitTestVisible="False"
                                                    Opacity="0" />
                                                <Border
                                                    x:Name="FocusVisualElement"
                                                    Margin="-2,-2,-17,-2"
                                                    BorderBrush="{StaticResource selectedStroke}"
                                                    BorderThickness="1"
                                                    CornerRadius="4"
                                                    IsHitTestVisible="False"
                                                    Visibility="Collapsed" />
                                            </Grid>
                                        </ControlTemplate>
                                    </TextBox.Template>
                                </TextBox>
                            </Grid>
                        </Border>
                        <Border
                            x:Name="DisabledVisualElement"
                            Background="#A5FFFFFF"
                            CornerRadius="3"
                            IsHitTestVisible="false"
                            Opacity="0" />
                        <Border
                            x:Name="FocusVisualElement"
                            Margin="-1"
                            BorderThickness="1"
                            CornerRadius="4"
                            IsHitTestVisible="false"
                            Visibility="Collapsed"
                            BorderBrush="{StaticResource selectedStroke}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Accordion-->
    <Style
        TargetType="layoutToolkit:Accordion">
        <Setter
            Property="Foreground"
            Value="#FF000000" />
        <Setter
            Property="BorderBrush"
            Value="#FFEAEAEA" />
        <Setter
            Property="HorizontalAlignment"
            Value="Left" />
        <Setter
            Property="VerticalAlignment"
            Value="Top" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="Cursor"
            Value="Arrow" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Padding"
            Value="0" />
        <Setter
            Property="Margin"
            Value="0" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel
                        VerticalAlignment="Top" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="layoutToolkit:Accordion">
                    <Grid
                        x:Name="Root">
                        <Border
                            x:Name="Border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                            <ScrollViewer
                                x:Name="ScrollViewer"
                                HorizontalAlignment="Stretch"
                                Margin="0"
                                VerticalAlignment="Stretch"
                                Background="{x:Null}"
                                BorderBrush="Transparent"
                                BorderThickness="0"
                                Padding="0"
                                HorizontalScrollBarVisibility="Hidden"
                                VerticalScrollBarVisibility="Hidden">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--AccordionButton-->
    <Style
        TargetType="layoutPrimitivesToolkit:AccordionButton">
        <Setter
            Property="BorderThickness"
            Value="0" />
        <Setter
            Property="Background"
            Value="White" />
        <Setter
            Property="HorizontalAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalAlignment"
            Value="Stretch" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="IsTabStop"
            Value="True" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="layoutPrimitivesToolkit:AccordionButton">
                    <Grid
                        Margin="{TemplateBinding Padding}"
                        Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="ExpandDown">




                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="cd1"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="-90" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="cd1"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="90" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="rd1"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform
                                                            Angle="90" />
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="rd1"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Duration="0"
                                            Storyboard.TargetName="header"
                                            Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform
                                                            Angle="-90" />
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="180" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.3"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimation
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.3"
                                            Storyboard.TargetName="icon"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                            To="90" />
                                        <ColorAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandedBackground"
                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame
                                                KeyTime="00:00:00"
                                                Value="#FFBADDE9" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="ExpandedBackground"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgoundPressed_Highlight"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver_Highlight"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.3" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Checked" />
                                <VisualState
                                    x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                    <VisualTransition
                                        From="MouseOver"
                                        GeneratedDuration="00:00:00.1"
                                        To="Normal" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation
                                            BeginTime="0"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)"
                                            To="#222" />
                                        <ColorAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="MouseOverBackground"
                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame
                                                KeyTime="00:00:00"
                                                Value="#FFBADDE9" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="MouseOverBackground"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.3" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundOver"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimation
                                            BeginTime="0"
                                            Storyboard.TargetName="arrow"
                                            Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)"
                                            To="#FF003366" />
                                        <ColorAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="MouseOverBackground"
                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame
                                                KeyTime="00:00:00"
                                                Value="#ff737573" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgroundPressed"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="BackgoundPressed_Highlight"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard />
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Duration="00:00:00.0010000"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00"
                                                Value="0.385" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="background"
                            Background="{TemplateBinding Background}"
                            CornerRadius="1,1,1,1">
                            <Grid>
                                <Border
                                    x:Name="BackgroundNorm"
                                    Background="{StaticResource grayGradient}"
                                    BorderThickness="1"
                                    BorderBrush="#FF8E8F8F"
                                    CornerRadius="3"
                                    Margin="0" />
                                <Border
                                    x:Name="BackgroundNorm_highlight"
                                    Margin="0"
                                    BorderBrush="#F2FFFFFF"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="3"
                                    Opacity="0.65" />
                                <Border
                                    x:Name="BackgroundOver"
                                    Background="{StaticResource BtnOverFill}"
                                    BorderBrush="{StaticResource TextBoxPressBrush}"
                                    BorderThickness="1"
                                    CornerRadius="3"
                                    Opacity="0"
                                    Margin="0" />
                                <Border
                                    x:Name="BackgroundOver_Highlight"
                                    Margin="0"
                                    Background="{StaticResource HThumbDivetOverStroke}"
                                    BorderBrush="{StaticResource hoverStroke}"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="3"
                                    Opacity="0" />
                                <Border
                                    x:Name="BackgroundPressed"
                                    Background="{StaticResource BtnPressFill}"
                                    BorderBrush="{StaticResource btnPressBorder}"
                                    BorderThickness="1"
                                    CornerRadius="3"
                                    Opacity="0"
                                    Margin="0" />
                                <Border
                                    x:Name="BackgoundPressed_Highlight"
                                    Background="{StaticResource btnPressFillHighlight}"
                                    Margin="0"
                                    CornerRadius="2.5"
                                    Opacity="0" />
                                <Border
                                    x:Name="Background_overlay"
                                    Margin="0"
                                    BorderThickness="1"
                                    CornerRadius="3,3,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#00FFFFFF"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#72FFFFFF"
                                                Offset="0.157" />
                                            <GradientStop
                                                Color="#72FFFFFF"
                                                Offset="0.5" />
                                            <GradientStop
                                                Color="#00FFFFFF"
                                                Offset="0.51" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border
                                    x:Name="ExpandedBackground"
                                    Height="Auto"
                                    Margin="0,0,0,0"
                                    VerticalAlignment="Stretch"
                                    Opacity="0"
                                    Background="#FFBADDE9"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="1,1,1,1" />
                                <Border
                                    x:Name="MouseOverBackground"
                                    Height="Auto"
                                    Margin="0,0,0,0"
                                    VerticalAlignment="Stretch"
                                    Opacity="0"
                                    Background="#FFBDBDBD"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="1,1,1,1" />
                                <Grid
                                    Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            x:Name="cd0"
                                            Width="Auto" />
                                        <ColumnDefinition
                                            x:Name="cd1"
                                            Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition
                                            x:Name="rd0"
                                            Height="Auto" />
                                        <RowDefinition
                                            x:Name="rd1"
                                            Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid
                                        x:Name="icon"
                                        Height="19"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="19"
                                        RenderTransformOrigin="0.5,0.5"
                                        Grid.Column="0"
                                        Grid.Row="0">
                                        <Grid.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform />
                                                <SkewTransform />
                                                <RotateTransform
                                                    Angle="-90" />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Grid.RenderTransform>
                                        <Path
                                            x:Name="arrow"
                                            Stroke="#666"
                                            StrokeThickness="2"
                                            Height="Auto"
                                            HorizontalAlignment="Center"
                                            Margin="0,0,0,0"
                                            VerticalAlignment="Center"
                                            Width="Auto"
                                            RenderTransformOrigin="0.5,0.5"
                                            Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform />
                                                    <SkewTransform />
                                                    <RotateTransform />
                                                    <TranslateTransform />
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                    <layoutToolkit:LayoutTransformer
                                        x:Name="header"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        Margin="6,6,6,0"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontSize="{TemplateBinding FontSize}"
                                        FontStretch="{TemplateBinding FontStretch}"
                                        FontStyle="{TemplateBinding FontStyle}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        Grid.Column="0"
                                        Grid.Row="0"
                                        Grid.RowSpan="1" />
                                </Grid>
                            </Grid>
                        </Border>
                        <Rectangle
                            x:Name="FocusVisualElement"
                            Stroke="#FF6DBDD1"
                            StrokeThickness="1"
                            RadiusX="1"
                            RadiusY="1"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--AccordionItem-->
    <Style
        TargetType="layoutToolkit:AccordionItem">
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="BorderBrush"
            Value="#FFECECEC" />
        <Setter
            Property="Background"
            Value="White" />
        <Setter
            Property="Margin"
            Value="0" />
        <Setter
            Property="Padding"
            Value="0" />
        <Setter
            Property="HorizontalAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalAlignment"
            Value="Stretch" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="layoutToolkit:AccordionItem">
                    <Grid
                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
                        Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Opacity)"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(ExpandableContentControl.Percentage)">
                                            <SplineDoubleKeyFrame
                                                KeySpline="0.2,0,0,1"
                                                KeyTime="00:00:00.3"
                                                Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="00:00:00"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(ExpandableContentControl.Percentage)">
                                            <SplineDoubleKeyFrame
                                                KeySpline="0.2,0,0,1"
                                                KeyTime="00:00:00.3"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="LockedStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Locked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unlocked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd1"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd0"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpanderButton"
                                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ExpandSite"
                                            Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="rd0"
                                            Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="cd1"
                                            Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="Background"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="1,1,1,1"
                            Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        x:Name="cd0"
                                        Width="Auto" />
                                    <ColumnDefinition
                                        x:Name="cd1"
                                        Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition
                                        x:Name="rd0"
                                        Height="Auto" />
                                    <RowDefinition
                                        x:Name="rd1"
                                        Height="Auto" />
                                </Grid.RowDefinitions>
                                <layoutPrimitivesToolkit:AccordionButton
                                    x:Name="ExpanderButton"
                                    HorizontalAlignment="Stretch"
                                    Margin="0,0,0,0"
                                    VerticalAlignment="Stretch"
                                    Background="{TemplateBinding Background}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontStretch="{TemplateBinding FontStretch}"
                                    FontStyle="{TemplateBinding FontStyle}"
                                    FontWeight="{TemplateBinding FontWeight}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    IsTabStop="True"
                                    Padding="0,0,0,0"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Content="{TemplateBinding Header}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    Grid.Row="0"
                                    IsChecked="{TemplateBinding IsSelected}"
                                    Foreground="{StaticResource OutsideFontColor}" />
                                <layoutPrimitivesToolkit:ExpandableContentControl
                                    x:Name="ExpandSite"
                                    HorizontalAlignment="Stretch"
                                    Margin="0,0,0,0"
                                    VerticalAlignment="Stretch"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontStretch="{TemplateBinding FontStretch}"
                                    FontStyle="{TemplateBinding FontStyle}"
                                    FontWeight="{TemplateBinding FontWeight}"
                                    Foreground="{TemplateBinding Foreground}"
                                    HorizontalContentAlignment="Left"
                                    IsTabStop="False"
                                    VerticalContentAlignment="Top"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Grid.Row="1"
                                    Percentage="0"
                                    RevealMode="{TemplateBinding ExpandDirection}" />
                            </Grid>
                        </Border>
                        <Border
                            x:Name="DisabledVisualElement"
                            IsHitTestVisible="false"
                            Opacity="0"
                            Background="#A5FFFFFF"
                            CornerRadius="3" />
                        <Border
                            x:Name="FocusVisualElement"
                            IsHitTestVisible="false"
                            Visibility="Collapsed"
                            BorderThickness="1"
                            CornerRadius="3">
                            <Border.BorderBrush>
                                <LinearGradientBrush
                                    EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                                    <GradientStop
                                        Color="#FFA3AEB9" />
                                    <GradientStop
                                        Color="#FF8399A9"
                                        Offset="0.375" />
                                    <GradientStop
                                        Color="#FF718597"
                                        Offset="0.375" />
                                    <GradientStop
                                        Color="#FF617584"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Childwindow-->
    <Style
        TargetType="controls:ChildWindow">
        <Setter
            Property="IsTabStop"
            Value="false" />
        <Setter
            Property="TabNavigation"
            Value="Cycle" />
        <Setter
            Property="HorizontalAlignment"
            Value="Center" />
        <Setter
            Property="VerticalAlignment"
            Value="Center" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="#FFA3AEB9"
                        Offset="0" />
                    <GradientStop
                        Color="#FF8399A9"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF718597"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF617584"
                        Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter
            Property="OverlayBrush"
            Value="#7F000000" />
        <Setter
            Property="OverlayOpacity"
            Value="1" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:ChildWindow">
                    <Grid
                        x:Name="Root">
                        <Grid.Resources>
                            <Style
                                x:Key="System.Windows.Controls.Button"
                                TargetType="Button">
                                <Setter
                                    Property="Background"
                                    Value="#FF1F3B53" />
                                <Setter
                                    Property="Foreground"
                                    Value="#FF000000" />
                                <Setter
                                    Property="Padding"
                                    Value="3" />
                                <Setter
                                    Property="BorderThickness"
                                    Value="1" />
                                <Setter
                                    Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFA3AEB9"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FF8399A9"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF718597"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF617584"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="Button">
                                            <Grid
                                                x:Name="grid"
                                                Height="14"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Width="15"
                                                Background="#02FFFFFF">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz2"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz1"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz0"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="X"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.95" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="X"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.85" />
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz2"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz1"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="X_Fuzz0"
                                                                    Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame
                                                                        KeyTime="0"
                                                                        Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="X"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.5" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Path
                                                    x:Name="X_Fuzz2"
                                                    Fill="#14C51900"
                                                    Stretch="Fill"
                                                    Stroke="#14C51900"
                                                    Height="8"
                                                    HorizontalAlignment="Center"
                                                    Margin="0,-1,0,0"
                                                    VerticalAlignment="Center"
                                                    Width="9"
                                                    Opacity="1"
                                                    RenderTransformOrigin="0.5,0.5"
                                                    Visibility="Collapsed"
                                                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform
                                                                ScaleX="1.3"
                                                                ScaleY="1.3" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path
                                                    x:Name="X_Fuzz1"
                                                    Fill="#1EC51900"
                                                    Stretch="Fill"
                                                    Stroke="#1EC51900"
                                                    Height="8"
                                                    HorizontalAlignment="Center"
                                                    Margin="0,-1,0,0"
                                                    VerticalAlignment="Center"
                                                    Width="9"
                                                    Opacity="1"
                                                    RenderTransformOrigin="0.5,0.5"
                                                    Visibility="Collapsed"
                                                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform
                                                                ScaleX="1.1"
                                                                ScaleY="1.1" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path
                                                    x:Name="X_Fuzz0"
                                                    Fill="#FFC51900"
                                                    Stretch="Fill"
                                                    Stroke="#FFC51900"
                                                    Height="8"
                                                    HorizontalAlignment="Center"
                                                    Margin="0,-1,0,0"
                                                    VerticalAlignment="Center"
                                                    Width="9"
                                                    Opacity="1"
                                                    Visibility="Collapsed"
                                                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" />
                                                <Path
                                                    x:Name="X"
                                                    Fill="#FFFFFFFF"
                                                    Stretch="Fill"
                                                    Height="8"
                                                    HorizontalAlignment="Center"
                                                    Margin="0,-1,0,0"
                                                    VerticalAlignment="Center"
                                                    Width="9"
                                                    Opacity="0.7"
                                                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                                                    <Path.Stroke>
                                                        <LinearGradientBrush
                                                            EndPoint="0.5,1"
                                                            StartPoint="0.5,0">
                                                            <GradientStop
                                                                Color="#FF313131"
                                                                Offset="1" />
                                                            <GradientStop
                                                                Color="#FF8E9092"
                                                                Offset="0" />
                                                        </LinearGradientBrush>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="WindowStates">
                                <VisualState
                                    x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="Overlay"
                                            Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00.3"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="ContentRoot"
                                            Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.25"
                                                Value="0" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.4"
                                                Value="1" />
                                            <SplineDoubleKeyFrame
                                                KeySpline="0,0,0.5,1"
                                                KeyTime="00:00:00.45"
                                                Value="1.05" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.55"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="ContentRoot"
                                            Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.25"
                                                Value="0" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.4"
                                                Value="1" />
                                            <SplineDoubleKeyFrame
                                                KeySpline="0,0,0.5,1"
                                                KeyTime="00:00:00.45"
                                                Value="1.05" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.55"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="Overlay"
                                            Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                            <EasingDoubleKeyFrame
                                                KeyTime="00:00:00.3"
                                                Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="ContentRoot"
                                            Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.2"
                                                Value="1" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.25"
                                                Value="1.05" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.45"
                                                Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames
                                            BeginTime="0"
                                            Storyboard.TargetName="ContentRoot"
                                            Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.2"
                                                Value="1" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.25"
                                                Value="1.05" />
                                            <SplineDoubleKeyFrame
                                                KeyTime="00:00:00.45"
                                                Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="Overlay"
                            HorizontalAlignment="Stretch"
                            Margin="0"
                            VerticalAlignment="Top"
                            Opacity="{TemplateBinding OverlayOpacity}"
                            Background="{TemplateBinding OverlayBrush}" />
                        <Grid
                            x:Name="ContentRoot"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalAlignment}"
                            Width="{TemplateBinding Width}"
                            RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Border
                                HorizontalAlignment="Stretch"
                                Margin="-1"
                                VerticalAlignment="Stretch"
                                Background="#14000000"
                                BorderBrush="#14000000"
                                BorderThickness="1"
                                CornerRadius="2" />
                            <Border
                                HorizontalAlignment="Stretch"
                                Margin="-2"
                                VerticalAlignment="Stretch"
                                Background="#0F000000"
                                BorderBrush="#0F000000"
                                BorderThickness="1"
                                CornerRadius="2.25" />
                            <Border
                                HorizontalAlignment="Stretch"
                                Margin="-3"
                                VerticalAlignment="Stretch"
                                Background="#0C000000"
                                BorderBrush="#0C000000"
                                BorderThickness="1"
                                CornerRadius="2.5" />
                            <Border
                                HorizontalAlignment="Stretch"
                                Margin="-4"
                                VerticalAlignment="Stretch"
                                Background="#0A000000"
                                BorderBrush="#0A000000"
                                BorderThickness="1"
                                CornerRadius="2.75" />
                            <Border
                                Background="#FFFFFFFF"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2">
                                <Border
                                    Margin="1"
                                    CornerRadius="1.5">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFE5E8EB"
                                                Offset="1" />
                                            <GradientStop
                                                Color="#FFF6F8F9"
                                                Offset="0" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <Border
                                            x:Name="Chrome"
                                            Width="Auto"
                                            BorderBrush="#FFFFFFFF"
                                            BorderThickness="0,0,0,1"
                                            Height="19">
                                            <Border.Background>
                                                <LinearGradientBrush
                                                    EndPoint="0.5,0.528"
                                                    StartPoint="0.5,0">
                                                    <GradientStop
                                                        Color="#FFE5E8EB"
                                                        Offset="1" />
                                                    <GradientStop
                                                        Color="#FFFEFEFE"
                                                        Offset="0" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <Grid
                                                Height="20"
                                                Width="Auto">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition />
                                                    <ColumnDefinition
                                                        Width="30" />
                                                </Grid.ColumnDefinitions>
                                                <Border
                                                    x:Name="BackgroundNorm"
                                                    Background="{StaticResource grayGradient}"
                                                    BorderThickness="0,0,0,1"
                                                    BorderBrush="#FF8E8F8F"
                                                    CornerRadius="3"
                                                    Margin="0"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="BackgroundNorm_highlight"
                                                    Margin="0"
                                                    BorderBrush="#F2FFFFFF"
                                                    BorderThickness="0,0,0,1"
                                                    CornerRadius="3"
                                                    Opacity="0.65"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="BackgroundOver"
                                                    Background="{StaticResource BtnOverFill}"
                                                    BorderBrush="{StaticResource TextBoxPressBrush}"
                                                    BorderThickness="0,0,0,1"
                                                    CornerRadius="3"
                                                    Opacity="0"
                                                    Margin="0"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="BackgroundOver_Highlight"
                                                    Margin="0"
                                                    Background="{StaticResource btnOverFillHighlight}"
                                                    BorderBrush="{StaticResource hoverStroke}"
                                                    BorderThickness="0,0,0,1"
                                                    CornerRadius="3"
                                                    Opacity="0"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="BackgroundPressed"
                                                    Background="{StaticResource BtnPressFill}"
                                                    BorderBrush="{StaticResource btnPressBorder}"
                                                    BorderThickness="0,0,0,1"
                                                    CornerRadius="3"
                                                    Opacity="0"
                                                    Margin="0"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="BackgoundPressed_Highlight"
                                                    Background="{StaticResource btnPressFillHighlight}"
                                                    Margin="0"
                                                    CornerRadius="2.5"
                                                    Opacity="0"
                                                    Grid.ColumnSpan="2" />
                                                <Border
                                                    x:Name="Background_overlay"
                                                    Margin="0"
                                                    BorderThickness="0,0,0,1"
                                                    CornerRadius="3,3,0,0"
                                                    Grid.ColumnSpan="2">
                                                    <Border.Background>
                                                        <LinearGradientBrush
                                                            EndPoint="0.5,1"
                                                            StartPoint="0.5,0">
                                                            <GradientStop
                                                                Color="#00FFFFFF"
                                                                Offset="0" />
                                                            <GradientStop
                                                                Color="#72FFFFFF"
                                                                Offset="0.157" />
                                                            <GradientStop
                                                                Color="#72FFFFFF"
                                                                Offset="0.5" />
                                                            <GradientStop
                                                                Color="#00FFFFFF"
                                                                Offset="0.51" />
                                                        </LinearGradientBrush>
                                                    </Border.Background>
                                                </Border>
                                                <ContentControl
                                                    HorizontalAlignment="Stretch"
                                                    Margin="6,0"
                                                    FontWeight="Bold"
                                                    IsTabStop="False"
                                                    Content="{TemplateBinding Title}" />
                                                <Button
                                                    x:Name="CloseButton"
                                                    Height="14"
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    Width="15"
                                                    IsTabStop="False"
                                                    Grid.Column="1" />
                                            </Grid>
                                        </Border>
                                        <Border
                                            Margin="7"
                                            Grid.Row="1"
                                            Background="{TemplateBinding Background}">
                                            <ContentPresenter
                                                x:Name="ContentPresenter"
                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                                        </Border>
                                    </Grid>
                                </Border>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataPager-->
    <Style
        TargetType="data:DataPager">
        <Setter
            Property="Background"
            Value="#FFF2F3F4" />
        <Setter
            Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="#FFA3AEB9"
                        Offset="0" />
                    <GradientStop
                        Color="#FF8399A9"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF718597"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF617584"
                        Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Right" />
        <Setter
            Property="NumericButtonStyle">
            <Setter.Value>
                <Style
                    TargetType="ToggleButton">
                    <Setter
                        Property="MinHeight"
                        Value="20" />
                    <Setter
                        Property="MinWidth"
                        Value="20" />
                    <Setter
                        Property="HorizontalAlignment"
                        Value="Right" />
                    <Setter
                        Property="VerticalAlignment"
                        Value="Center" />
                    <Setter
                        Property="Background"
                        Value="#00000000" />
                    <Setter
                        Property="BorderThickness"
                        Value="1" />
                    <Setter
                        Property="Padding"
                        Value="1" />
                    <Setter
                        Property="Template">
                        <Setter.Value>
                            <ControlTemplate
                                TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="OuterBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFFFFFFF" />
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="InnerBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFCCD1D6" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="OuterBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFFFFFFF" />
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="InnerBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFCCD1D6" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="contentPresenter"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0.5" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="CheckStates">
                                            <VisualState
                                                x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="CheckedStateOuterBorder"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unchecked" />
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusVisualElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border
                                        x:Name="CheckedStateOuterBorder"
                                        Opacity="0"
                                        Background="#7FA9A9A9"
                                        BorderBrush="#00FFFFFF"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="3" />
                                    <Border
                                        x:Name="OuterBtnBorder"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="#00FFFFFF"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="3">
                                        <Border
                                            x:Name="InnerBtnBorder"
                                            BorderBrush="#00CCD1D6"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            CornerRadius="2">
                                            <ContentPresenter
                                                x:Name="contentPresenter"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                                        </Border>
                                    </Border>
                                    <Border
                                        x:Name="FocusVisualElement"
                                        Margin="1"
                                        Opacity="0"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="#FF6DBDD1"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="2" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="data:DataPager">
                    <Grid
                        x:Name="Root"
                        Background="Transparent">
                        <Grid.Resources>
                            <SolidColorBrush
                                x:Key="BackgroundColor"
                                Color="#00000000" />
                            <SolidColorBrush
                                x:Key="ForegroundColor"
                                Color="#FF000000" />
                            <SolidColorBrush
                                x:Key="BorderBrushColor"
                                Color="#FFFFFFFF" />
                            <ControlTemplate
                                x:Key="ButtonTemplate"
                                TargetType="Button">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup
                                            x:Name="CommonStates">
                                            <VisualState
                                                x:Name="Normal" />
                                            <VisualState
                                                x:Name="MouseOver">
                                                <Storyboard>
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="OuterBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFFFFFFF" />
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="InnerBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFCCD1D6" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="OuterBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#FFFFFFFF" />
                                                    <ColorAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="InnerBtnBorder"
                                                        Storyboard.TargetProperty="(BorderBrush).Color"
                                                        To="#00FFFFFF" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="path"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0.5" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup
                                            x:Name="FocusStates">
                                            <VisualState
                                                x:Name="Focused">
                                                <Storyboard>
                                                    <DoubleAnimation
                                                        Duration="0"
                                                        Storyboard.TargetName="FocusVisualElement"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState
                                                x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border
                                        x:Name="OuterBtnBorder"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="#00FFFFFF"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="3">
                                        <Border
                                            x:Name="InnerBtnBorder"
                                            BorderBrush="#00CCD1D6"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            CornerRadius="2">
                                            <ContentPresenter
                                                x:Name="path"
                                                Content="{TemplateBinding Content}" />
                                        </Border>
                                    </Border>
                                    <Border
                                        x:Name="FocusVisualElement"
                                        Margin="1"
                                        Opacity="0"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="#FF6DBDD1"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="2" />
                                </Grid>
                            </ControlTemplate>
                            <Style
                                x:Key="PagingTextBoxStyle"
                                TargetType="TextBox">
                                <Setter
                                    Property="BorderThickness"
                                    Value="1" />
                                <Setter
                                    Property="Background"
                                    Value="#FFFFFFFF" />
                                <Setter
                                    Property="Foreground"
                                    Value="#FF000000" />
                                <Setter
                                    Property="Padding"
                                    Value="2, 2, 2, -1" />
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="TextBox">
                                            <Grid
                                                x:Name="RootElement">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation
                                                                    Storyboard.TargetName="MouseOverBorder"
                                                                    Storyboard.TargetProperty="(BorderBrush).Color"
                                                                    To="#FF99C1E2" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="DisabledVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="ReadOnly">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="ReadOnlyVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="FocusVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border
                                                    x:Name="Border"
                                                    Opacity="1"
                                                    Background="#66FFFFFF"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="1">
                                                    <Grid>
                                                        <Border
                                                            x:Name="ReadOnlyVisualElement"
                                                            Opacity="0"
                                                            Background="#72F7F7F7" />
                                                        <Border
                                                            x:Name="MouseOverBorder"
                                                            BorderBrush="Transparent"
                                                            BorderThickness="1">
                                                            <ScrollViewer
                                                                x:Name="ContentElement"
                                                                BorderThickness="0"
                                                                IsTabStop="False"
                                                                Padding="{TemplateBinding Padding}"
                                                                Margin="0,-3,0,0"
                                                                VerticalAlignment="Top" />
                                                        </Border>
                                                    </Grid>
                                                </Border>
                                                <Border
                                                    x:Name="DisabledVisualElement"
                                                    IsHitTestVisible="False"
                                                    Opacity="0"
                                                    Background="#A5F7F7F7"
                                                    BorderBrush="#A5F7F7F7"
                                                    BorderThickness="{TemplateBinding BorderThickness}" />
                                                <Border
                                                    x:Name="FocusVisualElement"
                                                    Margin="1"
                                                    IsHitTestVisible="False"
                                                    Opacity="0"
                                                    BorderBrush="#FF6DBDD1"
                                                    BorderThickness="{TemplateBinding BorderThickness}" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style
                                x:Key="PagerButtonStyle"
                                TargetType="Button">
                                <Setter
                                    Property="Background"
                                    Value="#FF1F3B53" />
                                <Setter
                                    Property="Foreground"
                                    Value="#FF000000" />
                                <Setter
                                    Property="Padding"
                                    Value="3" />
                                <Setter
                                    Property="BorderThickness"
                                    Value="1" />
                                <Setter
                                    Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFA3AEB9"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FF8399A9"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF718597"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF617584"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="Button">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundOver"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.8" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundOver_Highlight"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.85" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="Background"
                                                                    Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame
                                                                        KeyTime="0"
                                                                        Value="#FF6DBDD1" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundPressed"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.9" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgoundPressed_Highlight"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.85" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="DisabledVisualElement"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".55" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="FocusVisualElement"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border
                                                    x:Name="Background"
                                                    Background="White"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3">
                                                    <Grid
                                                        Margin="1"
                                                        Background="{TemplateBinding Background}">
                                                        <Border
                                                            x:Name="BackgroundNorm"
                                                            Background="{StaticResource grayGradient}"
                                                            BorderThickness="1"
                                                            BorderBrush="#FF8E8F8F"
                                                            CornerRadius="3"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgroundNorm_highlight"
                                                            Margin="0"
                                                            BorderBrush="#F2FFFFFF"
                                                            BorderThickness="1,0,1,1"
                                                            CornerRadius="3"
                                                            Opacity="0.65" />
                                                        <Border
                                                            x:Name="BackgroundOver"
                                                            Background="{StaticResource BtnOverFill}"
                                                            BorderBrush="{StaticResource TextBoxPressBrush}"
                                                            BorderThickness="1"
                                                            CornerRadius="3"
                                                            Opacity="0"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgroundOver_Highlight"
                                                            Margin="0"
                                                            Background="{StaticResource btnOverFillHighlight}"
                                                            BorderBrush="{StaticResource hoverStroke}"
                                                            BorderThickness="1,0,1,1"
                                                            CornerRadius="3"
                                                            Opacity="0" />
                                                        <Border
                                                            x:Name="BackgroundPressed"
                                                            Background="{StaticResource BtnPressFill}"
                                                            BorderBrush="{StaticResource btnPressBorder}"
                                                            BorderThickness="1"
                                                            CornerRadius="3"
                                                            Opacity="0"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgoundPressed_Highlight"
                                                            Background="{StaticResource btnPressFillHighlight}"
                                                            Margin="0"
                                                            CornerRadius="2.5"
                                                            Opacity="0" />
                                                        <Border
                                                            x:Name="Background_overlay"
                                                            Margin="0"
                                                            BorderThickness="1"
                                                            CornerRadius="3,3,0,0">
                                                            <Border.Background>
                                                                <LinearGradientBrush
                                                                    EndPoint="0.5,1"
                                                                    StartPoint="0.5,0">
                                                                    <GradientStop
                                                                        Color="#00FFFFFF"
                                                                        Offset="0" />
                                                                    <GradientStop
                                                                        Color="#72FFFFFF"
                                                                        Offset="0.157" />
                                                                    <GradientStop
                                                                        Color="#72FFFFFF"
                                                                        Offset="0.5" />
                                                                    <GradientStop
                                                                        Color="#00FFFFFF"
                                                                        Offset="0.51" />
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                        </Border>
                                                    </Grid>
                                                </Border>
                                                <ContentPresenter
                                                    x:Name="contentPresenter"
                                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                    Margin="{TemplateBinding Padding}"
                                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                <Rectangle
                                                    x:Name="DisabledVisualElement"
                                                    Fill="#FFFFFFFF"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    IsHitTestVisible="false"
                                                    Opacity="0" />
                                                <Rectangle
                                                    x:Name="FocusVisualElement"
                                                    Stroke="#FF6DBDD1"
                                                    StrokeThickness="1"
                                                    RadiusX="2"
                                                    RadiusY="2"
                                                    Margin="1"
                                                    IsHitTestVisible="false"
                                                    Opacity="0" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentPagePrefixTextBlock"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.5" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="CurrentPageSuffixTextBlock"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.5" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="MoveStates">
                                <VisualState
                                    x:Name="MoveEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MoveDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="MoveFirstStates">
                                <VisualState
                                    x:Name="MoveFirstEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FirstPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MoveFirstDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FirstPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="MovePreviousStates">
                                <VisualState
                                    x:Name="MovePreviousEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="PreviousPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MovePreviousDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="PreviousPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="MoveNextStates">
                                <VisualState
                                    x:Name="MoveNextEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="NextPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MoveNextDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="NextPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="MoveLastStates">
                                <VisualState
                                    x:Name="MoveLastEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="LastPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="MoveLastDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="LastPageButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="DisplayModeStates">
                                <VisualState
                                    x:Name="FirstLastNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="NextPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PreviousPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PageDisplay"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="FirstLastPreviousNext">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="NumericButtonPanel"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="FirstLastPreviousNextNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PageDisplay"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Numeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="FirstPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="LastPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="NextPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PreviousPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PageDisplay"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Separator1"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Separator2"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="PreviousNext">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="FirstPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="LastPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="NumericButtonPanel"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="PreviousNextNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="FirstPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="LastPageButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="CurrentPageTextBox"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PageDisplay"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            MinHeight="24"
                            VerticalAlignment="Bottom"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2"
                            Padding="{TemplateBinding Padding}">
                            <StackPanel
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="Stretch"
                                Orientation="Horizontal"
                                Margin="0,0,10,0">
                                <Button
                                    x:Name="FirstPageButton"
                                    Background="{StaticResource BackgroundColor}"
                                    BorderBrush="{StaticResource BorderBrushColor}"
                                    BorderThickness="1"
                                    Foreground="{StaticResource ForegroundColor}"
                                    Padding="1"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Center"
                                    Width="20"
                                    Style="{StaticResource PagerButtonStyle}">
                                    <Grid
                                        Height="9"
                                        Width="8">
                                        <Path
                                            Fill="{TemplateBinding Foreground}"
                                            Stretch="Fill"
                                            Height="9"
                                            HorizontalAlignment="Right"
                                            Width="5"
                                            Data="M0,1 L1,0 L1,2 Z" />
                                        <Rectangle
                                            Fill="{TemplateBinding Foreground}"
                                            HorizontalAlignment="Left"
                                            Width="2" />
                                    </Grid>
                                </Button>
                                <Button
                                    x:Name="PreviousPageButton"
                                    Background="{StaticResource BackgroundColor}"
                                    BorderBrush="{StaticResource BorderBrushColor}"
                                    BorderThickness="1"
                                    Foreground="{StaticResource ForegroundColor}"
                                    Padding="1"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Center"
                                    Width="20"
                                    Style="{StaticResource PagerButtonStyle}">
                                    <Path
                                        Fill="{TemplateBinding Foreground}"
                                        Stretch="Fill"
                                        Height="9"
                                        HorizontalAlignment="Center"
                                        Width="5"
                                        Data="M0,1 L1,0 L1,2 Z" />
                                </Button>
                                <Border
                                    x:Name="Separator1"
                                    Margin="0,3,0,3"
                                    Width="1"
                                    Background="#FFCCD1D6"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="1,0,1,0" />
                                <StackPanel
                                    x:Name="NumericButtonPanel"
                                    Margin="1"
                                    Orientation="Horizontal" />
                                <StackPanel
                                    x:Name="PageDisplay"
                                    Orientation="Horizontal">
                                    <TextBlock
                                        x:Name="CurrentPagePrefixTextBlock"
                                        Margin="4,0,0,0"
                                        VerticalAlignment="Center"
                                        Width="Auto"
                                        Foreground="{TemplateBinding Foreground}" />
                                    <TextBox
                                        x:Name="CurrentPageTextBox"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Height="Auto"
                                        Margin="4,2,4,2"
                                        VerticalAlignment="Center"
                                        Width="40"
                                        TextWrapping="Wrap" />
                                    <TextBlock
                                        x:Name="CurrentPageSuffixTextBlock"
                                        Margin="0,0,4,0"
                                        VerticalAlignment="Center"
                                        Width="Auto"
                                        Foreground="{TemplateBinding Foreground}" />
                                </StackPanel>
                                <Border
                                    x:Name="Separator2"
                                    Margin="0,3,0,3"
                                    Width="1"
                                    Background="#FFCCD1D6"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="1,0,1,0" />
                                <Button
                                    x:Name="NextPageButton"
                                    Background="{StaticResource BackgroundColor}"
                                    BorderBrush="{StaticResource BorderBrushColor}"
                                    BorderThickness="1"
                                    Foreground="{StaticResource ForegroundColor}"
                                    Padding="1"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Center"
                                    Width="20"
                                    Style="{StaticResource PagerButtonStyle}">
                                    <Path
                                        Fill="{TemplateBinding Foreground}"
                                        Stretch="Fill"
                                        Height="9"
                                        HorizontalAlignment="Center"
                                        Width="5"
                                        Data="M0,0 L1,1 L0,2 Z" />
                                </Button>
                                <Button
                                    x:Name="LastPageButton"
                                    Background="{StaticResource BackgroundColor}"
                                    BorderBrush="{StaticResource BorderBrushColor}"
                                    BorderThickness="1"
                                    Foreground="{StaticResource ForegroundColor}"
                                    Padding="1"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Center"
                                    Width="20"
                                    Style="{StaticResource PagerButtonStyle}">
                                    <Grid
                                        Height="9"
                                        Width="8">
                                        <Path
                                            Fill="{TemplateBinding Foreground}"
                                            Stretch="Fill"
                                            Height="9"
                                            HorizontalAlignment="Left"
                                            Width="5"
                                            Data="M0,0 L1,1 L0,2 Z" />
                                        <Rectangle
                                            Fill="{TemplateBinding Foreground}"
                                            HorizontalAlignment="Right"
                                            Width="2" />
                                    </Grid>
                                </Button>
                            </StackPanel>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataForm-->
    <Style
        TargetType="dataForm:DataForm">
        <Setter
            Property="AutoCommit"
            Value="True" />
        <Setter
            Property="AutoGenerateFields"
            Value="True" />
        <Setter
            Property="Background">
            <Setter.Value>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="#FFF3F7FA"
                        Offset="0" />
                    <GradientStop
                        Color="#FFFFFFFF"
                        Offset="0.1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush
                    EndPoint="0,1"
                    StartPoint="0,0">
                    <GradientStop
                        Color="#FFA3AEB9"
                        Offset="0" />
                    <GradientStop
                        Color="#FF8399A9"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF718597"
                        Offset="0.375" />
                    <GradientStop
                        Color="#FF617584"
                        Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter
            Property="DescriptionViewerPosition"
            Value="Auto" />
        <Setter
            Property="LabelPosition"
            Value="Auto" />
        <Setter
            Property="HeaderVisibility"
            Value="Visible" />
        <Setter
            Property="Padding"
            Value="5" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="dataForm:DataForm">
                    <Grid
                        dataForm:DataField.IsFieldGroup="True">
                        <Grid.Resources>
                            <Style
                                x:Key="ButtonGeneric"
                                TargetType="Button">
                                <Setter
                                    Property="Background"
                                    Value="#00000000" />
                                <Setter
                                    Property="Foreground"
                                    Value="#FF000000" />
                                <Setter
                                    Property="BorderBrush"
                                    Value="#FFFFFFFF" />
                                <Setter
                                    Property="BorderThickness"
                                    Value="1" />
                                <Setter
                                    Property="Padding"
                                    Value="1" />
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="Button">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="OuterBtnBorder"
                                                                    Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
                                                                    To="#FFFFFFFF" />
                                                                <ColorAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="InnerBtnBorder"
                                                                    Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
                                                                    To="#7FA9A9A9" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="InnerBtnBorder"
                                                                    Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
                                                                    To="#7FA9A9A9" />
                                                                <ColorAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="InnerBtnBorder"
                                                                    Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
                                                                    To="#7FA9A9A9" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="contentPresenter"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0.3" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="FocusVisualElement"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="1" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border
                                                    x:Name="OuterBtnBorder"
                                                    Background="{TemplateBinding Background}"
                                                    BorderBrush="#00FFFFFF"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3">
                                                    <Border
                                                        x:Name="InnerBtnBorder"
                                                        Background="#00A9A9A9"
                                                        BorderBrush="#00A9A9A9"
                                                        BorderThickness="{TemplateBinding BorderThickness}"
                                                        CornerRadius="2">
                                                        <ContentPresenter
                                                            x:Name="contentPresenter"
                                                            Height="Auto"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center"
                                                            Width="Auto"
                                                            Content="{TemplateBinding Content}"
                                                            ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                    </Border>
                                                </Border>
                                                <Border
                                                    x:Name="FocusVisualElement"
                                                    Margin="1"
                                                    Opacity="0"
                                                    Background="{TemplateBinding Background}"
                                                    BorderBrush="#FF6DBDD1"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="2" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style
                                x:Key="CustomScrollViewerStyle"
                                TargetType="ScrollViewer">
                                <Setter
                                    Property="HorizontalContentAlignment"
                                    Value="Left" />
                                <Setter
                                    Property="VerticalContentAlignment"
                                    Value="Top" />
                                <Setter
                                    Property="BorderThickness"
                                    Value="0,1" />
                                <Setter
                                    Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFA3AEB9"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FF8399A9"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF718597"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF617584"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="ScrollViewer">
                                            <Grid>
                                                <Border
                                                    Margin="0,-1"
                                                    Opacity="0.2"
                                                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}">
                                                    <Border.OpacityMask>
                                                        <LinearGradientBrush
                                                            EndPoint="1.07,0.5"
                                                            StartPoint="-0.07,0.5">
                                                            <GradientStop
                                                                Color="#FF000000" />
                                                            <GradientStop
                                                                Color="#7FFFFFFF"
                                                                Offset="0.5" />
                                                            <GradientStop
                                                                Color="#FF000000"
                                                                Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Border.OpacityMask>
                                                </Border>
                                                <Grid
                                                    Background="{TemplateBinding Background}">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition
                                                            Width="*" />
                                                        <ColumnDefinition
                                                            Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition
                                                            Height="*" />
                                                        <RowDefinition
                                                            Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <ScrollContentPresenter
                                                        x:Name="ScrollContentPresenter"
                                                        Cursor="{TemplateBinding Cursor}"
                                                        Margin="{TemplateBinding Padding}"
                                                        ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                    <Rectangle
                                                        Fill="#FFE9EEF4"
                                                        Grid.Column="1"
                                                        Grid.Row="1" />
                                                    <ScrollBar
                                                        x:Name="VerticalScrollBar"
                                                        Margin="0,-1"
                                                        Width="18"
                                                        Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                                        IsTabStop="False"
                                                        Grid.Column="1"
                                                        Grid.Row="0"
                                                        Maximum="{TemplateBinding ScrollableHeight}"
                                                        Minimum="0"
                                                        Value="{TemplateBinding VerticalOffset}"
                                                        Orientation="Vertical"
                                                        ViewportSize="{TemplateBinding ViewportHeight}" />
                                                    <ScrollBar
                                                        x:Name="HorizontalScrollBar"
                                                        Height="18"
                                                        Margin="-1,0,-1,-1"
                                                        Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                                        IsTabStop="False"
                                                        Grid.Column="0"
                                                        Grid.Row="1"
                                                        Maximum="{TemplateBinding ScrollableWidth}"
                                                        Minimum="0"
                                                        Value="{TemplateBinding HorizontalOffset}"
                                                        Orientation="Horizontal"
                                                        ViewportSize="{TemplateBinding ViewportWidth}" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>

                            <!--DataFormButton-->
                            <Style
                                x:Key="DataFormButtonStyle"
                                TargetType="Button">
                                <Setter
                                    Property="Background"
                                    Value="#FF1F3B53" />
                                <Setter
                                    Property="Foreground"
                                    Value="#FF000000" />
                                <Setter
                                    Property="Padding"
                                    Value="3" />
                                <Setter
                                    Property="BorderThickness"
                                    Value="1" />
                                <Setter
                                    Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#FFA3AEB9"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#FF8399A9"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF718597"
                                                Offset="0.375" />
                                            <GradientStop
                                                Color="#FF617584"
                                                Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter
                                    Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate
                                            TargetType="Button">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundOver"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.9" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundOver_Highlight"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.85" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="Background"
                                                                    Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame
                                                                        KeyTime="0"
                                                                        Value="#FF6DBDD1" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgroundPressed"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.9" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="BackgoundPressed_Highlight"
                                                                    Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="00:00:00"
                                                                        Value="0.85" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="DisabledVisualElement"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".55" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup
                                                        x:Name="FocusStates">
                                                        <VisualState
                                                            x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="FocusVisualElement"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border
                                                    x:Name="Background"
                                                    Background="White"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    CornerRadius="3">
                                                    <Grid
                                                        Margin="1">
                                                        <Border
                                                            x:Name="BackgroundNorm"
                                                            Background="{StaticResource grayGradient}"
                                                            BorderThickness="1"
                                                            BorderBrush="#FF8E8F8F"
                                                            CornerRadius="3"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgroundNorm_highlight"
                                                            Margin="0"
                                                            BorderBrush="#F2FFFFFF"
                                                            BorderThickness="1,0,1,1"
                                                            CornerRadius="3"
                                                            Opacity="0.65" />
                                                        <Border
                                                            x:Name="BackgroundOver"
                                                            Background="{StaticResource BtnOverFill}"
                                                            BorderBrush="{StaticResource TextBoxPressBrush}"
                                                            BorderThickness="1"
                                                            CornerRadius="3"
                                                            Opacity="0"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgroundOver_Highlight"
                                                            Margin="0"
                                                            Background="{StaticResource btnOverFillHighlight}"
                                                            BorderBrush="{StaticResource hoverStroke}"
                                                            BorderThickness="1,0,1,1"
                                                            CornerRadius="3"
                                                            Opacity="0" />
                                                        <Border
                                                            x:Name="BackgroundPressed"
                                                            Background="{StaticResource BtnPressFill}"
                                                            BorderBrush="{StaticResource btnPressBorder}"
                                                            BorderThickness="1"
                                                            CornerRadius="3"
                                                            Opacity="0"
                                                            Margin="0" />
                                                        <Border
                                                            x:Name="BackgoundPressed_Highlight"
                                                            Background="{StaticResource btnPressFillHighlight}"
                                                            Margin="0"
                                                            CornerRadius="2.5"
                                                            Opacity="0" />
                                                        <Border
                                                            x:Name="Background_overlay"
                                                            Margin="0"
                                                            BorderThickness="1"
                                                            CornerRadius="3,3,0,0">
                                                            <Border.Background>
                                                                <LinearGradientBrush
                                                                    EndPoint="0.5,1"
                                                                    StartPoint="0.5,0">
                                                                    <GradientStop
                                                                        Color="#00FFFFFF"
                                                                        Offset="0" />
                                                                    <GradientStop
                                                                        Color="#72FFFFFF"
                                                                        Offset="0.157" />
                                                                    <GradientStop
                                                                        Color="#72FFFFFF"
                                                                        Offset="0.5" />
                                                                    <GradientStop
                                                                        Color="#00FFFFFF"
                                                                        Offset="0.51" />
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                        </Border>
                                                    </Grid>
                                                </Border>
                                                <ContentPresenter
                                                    x:Name="contentPresenter"
                                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                    Margin="{TemplateBinding Padding}"
                                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                <Rectangle
                                                    x:Name="DisabledVisualElement"
                                                    Fill="#FFFFFFFF"
                                                    RadiusX="3"
                                                    RadiusY="3"
                                                    IsHitTestVisible="false"
                                                    Opacity="0" />
                                                <Rectangle
                                                    x:Name="FocusVisualElement"
                                                    Stroke="#FF6DBDD1"
                                                    StrokeThickness="1"
                                                    RadiusX="2"
                                                    RadiusY="2"
                                                    Margin="1"
                                                    IsHitTestVisible="false"
                                                    Opacity="0" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ModeStates">
                                <VisualState
                                    x:Name="ReadOnly" />
                                <VisualState
                                    x:Name="Empty">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="ContentPresenter"
                                            Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="ContentPresenter"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Edit">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="EditButton"
                                            Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="false" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CommitButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="CancelButton"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ValidationStates">
                                <VisualState
                                    x:Name="Valid" />
                                <VisualState
                                    x:Name="Invalid" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CommittedStates">
                                <VisualState
                                    x:Name="Committed" />
                                <VisualState
                                    x:Name="Uncommitted">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="ChangeIndicator"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.9" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ScopeStates">
                                <VisualState
                                    x:Name="Entity" />
                                <VisualState
                                    x:Name="Collection" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="DataFormBorder"
                            Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition
                                        Height="Auto" />
                                    <RowDefinition />
                                    <RowDefinition
                                        Height="Auto" />
                                    <RowDefinition
                                        Height="Auto" />
                                </Grid.RowDefinitions>
                                <Border
                                    x:Name="BackgroundNorm"
                                    Background="{StaticResource grayGradient}"
                                    BorderThickness="1"
                                    BorderBrush="#FF8E8F8F"
                                    CornerRadius="3"
                                    Margin="0"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="BackgroundNorm_highlight"
                                    Margin="1,0,0,0"
                                    BorderBrush="#F2FFFFFF"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="3"
                                    Opacity="0.65"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="BackgroundOver"
                                    Background="{StaticResource BtnOverFill}"
                                    BorderBrush="{StaticResource TextBoxPressBrush}"
                                    BorderThickness="1"
                                    CornerRadius="3"
                                    Opacity="0"
                                    Margin="0"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="BackgroundOver_Highlight"
                                    Margin="1,0,0,0"
                                    Background="{StaticResource btnOverFillHighlight}"
                                    BorderBrush="{StaticResource hoverStroke}"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="3"
                                    Opacity="0"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="BackgroundPressed"
                                    Background="{StaticResource BtnPressFill}"
                                    BorderBrush="{StaticResource btnPressBorder}"
                                    BorderThickness="1"
                                    CornerRadius="3"
                                    Opacity="0"
                                    Margin="0"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="BackgoundPressed_Highlight"
                                    Background="{StaticResource btnPressFillHighlight}"
                                    Margin="1,0,0,0"
                                    CornerRadius="2.5"
                                    Opacity="0"
                                    Grid.RowSpan="2" />
                                <Border
                                    x:Name="Background_overlay"
                                    Margin="1,1,-1,5"
                                    BorderThickness="1"
                                    CornerRadius="3,3,0,0"
                                    Grid.RowSpan="2">
                                    <Border.Background>
                                        <LinearGradientBrush
                                            EndPoint="0.5,1"
                                            StartPoint="0.5,0">
                                            <GradientStop
                                                Color="#00FFFFFF"
                                                Offset="0" />
                                            <GradientStop
                                                Color="#72FFFFFF"
                                                Offset="0.157" />
                                            <GradientStop
                                                Color="#72FFFFFF"
                                                Offset="0.5" />
                                            <GradientStop
                                                Color="#00FFFFFF"
                                                Offset="0.51" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Grid
                                    MinHeight="27"
                                    Visibility="{TemplateBinding HeaderVisibility}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="8" />
                                    </Grid.ColumnDefinitions>
                                    <StackPanel
                                        Orientation="Horizontal">
                                        <ContentControl
                                            x:Name="HeaderElement"
                                            Margin="10,0,0,0"
                                            VerticalAlignment="Center"
                                            FontWeight="Bold"
                                            Foreground="{TemplateBinding Foreground}"
                                            Content="{TemplateBinding Header}"
                                            ContentTemplate="{TemplateBinding HeaderTemplate}" />
                                        <TextBlock
                                            x:Name="ChangeIndicator"
                                            Margin="3,-2,8,2"
                                            VerticalAlignment="Center"
                                            Opacity="0"
                                            FontWeight="Bold"
                                            Foreground="{TemplateBinding Foreground}"
                                            Text="*" />
                                        <Button
                                            x:Name="CancelButton"
                                            Margin="0,5,8,-22"
                                            MinHeight="17"
                                            MinWidth="71"
                                            Visibility="Collapsed"
                                            HorizontalContentAlignment="Center"
                                            VerticalContentAlignment="Center"
                                            Content="Cancel"
                                            Style="{StaticResource DataFormButtonStyle}" />
                                    </StackPanel>
                                    <StackPanel
                                        Margin="0,3,0,2"
                                        Grid.Column="2"
                                        Orientation="Horizontal">
                                        <Button
                                            x:Name="FirstItemButton"
                                            Background="{x:Null}"
                                            BorderBrush="{x:Null}"
                                            Style="{StaticResource DataFormButtonStyle}">
                                            <Grid
                                                Height="9"
                                                Margin="6,5,5,5"
                                                Width="8"
                                                Opacity="1">
                                                <Grid.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        Opacity="1"
                                                        ShadowDepth="0" />
                                                </Grid.Effect>
                                                <Grid.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.6,1"
                                                        StartPoint="0.4,0">
                                                        <GradientStop
                                                            Color="#7FFFFFFF"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Grid.OpacityMask>
                                                <Path
                                                    Fill="{TemplateBinding Foreground}"
                                                    Stretch="Fill"
                                                    Height="9"
                                                    HorizontalAlignment="Right"
                                                    Margin="0"
                                                    Width="5"
                                                    Opacity="0.85"
                                                    Data="M1,0 L1,2 L0,1 Z" />
                                                <Rectangle
                                                    Fill="{TemplateBinding Foreground}"
                                                    HorizontalAlignment="Left"
                                                    Width="2"
                                                    Opacity="0.85" />
                                            </Grid>
                                        </Button>
                                        <Button
                                            x:Name="PreviousItemButton"
                                            Style="{StaticResource DataFormButtonStyle}">
                                            <Path
                                                Fill="{TemplateBinding Foreground}"
                                                Stretch="Fill"
                                                Height="9"
                                                Margin="6,5,8,5"
                                                Width="5"
                                                Opacity="0.85"
                                                Data="M1,0 L1,2 L0,1 Z">
                                                <Path.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        ShadowDepth="0" />
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.6,1"
                                                        StartPoint="0.4,0">
                                                        <GradientStop
                                                            Color="#7F000000"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                        <Button
                                            x:Name="NextItemButton"
                                            Style="{StaticResource DataFormButtonStyle}">
                                            <Path
                                                Fill="{TemplateBinding Foreground}"
                                                Stretch="Fill"
                                                Height="9"
                                                Margin="8,5,6,5"
                                                Width="5"
                                                Opacity="0.85"
                                                Data="M0,0 L1,1 L0,2 Z">
                                                <Path.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        ShadowDepth="0" />
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.6,1"
                                                        StartPoint="0.4,0">
                                                        <GradientStop
                                                            Color="#7F000000"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                        <Button
                                            x:Name="LastItemButton"
                                            Style="{StaticResource DataFormButtonStyle}">
                                            <Grid
                                                Height="9"
                                                Margin="6,5,5,5"
                                                Width="8"
                                                Opacity="1">
                                                <Grid.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        ShadowDepth="0" />
                                                </Grid.Effect>
                                                <Grid.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.6,1"
                                                        StartPoint="0.4,0">
                                                        <GradientStop
                                                            Color="#7F000000"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Grid.OpacityMask>
                                                <Path
                                                    Fill="{TemplateBinding Foreground}"
                                                    Stretch="Fill"
                                                    Height="9"
                                                    HorizontalAlignment="Left"
                                                    Width="5"
                                                    Opacity="0.85"
                                                    Data="M0,0 L1,1 L0,2 Z" />
                                                <Rectangle
                                                    Fill="{TemplateBinding Foreground}"
                                                    HorizontalAlignment="Right"
                                                    Width="2"
                                                    Opacity="0.85" />
                                            </Grid>
                                        </Button>
                                        <Border
                                            x:Name="ButtonSeparator"
                                            Margin="2,4,2,4"
                                            Width="3"
                                            Opacity="0.2"
                                            BorderBrush="#59FFFFFF"
                                            BorderThickness="1,0,1,0"
                                            Background="{StaticResource VThumbDivetOverStroke}" />
                                        <Button
                                            x:Name="EditButton"
                                            Style="{StaticResource DataFormButtonStyle}"
                                            ToolTipService.ToolTip="Edit">
                                            <Button.OpacityMask>
                                                <LinearGradientBrush
                                                    EndPoint="0.57,0.76"
                                                    StartPoint="0.42,0.01">
                                                    <GradientStop
                                                        Color="#7F000000"
                                                        Offset="0" />
                                                    <GradientStop
                                                        Color="#BF000000"
                                                        Offset="0.442" />
                                                    <GradientStop
                                                        Color="#FF000000"
                                                        Offset="1" />
                                                </LinearGradientBrush>
                                            </Button.OpacityMask>
                                            <Grid
                                                Height="19"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Width="19">
                                                <Canvas
                                                    HorizontalAlignment="Stretch"
                                                    Margin="2,2,0,0"
                                                    VerticalAlignment="Stretch">
                                                    <Path
                                                        Fill="{TemplateBinding Foreground}"
                                                        Stretch="Fill"
                                                        Height="10.5"
                                                        Width="10.56"
                                                        Canvas.Left="2.53"
                                                        Canvas.Top="3.01"
                                                        Data="F1 M 2.53,9.96L 4.96,11.1L 6.08,13.50L 13.09,6.50L 9.6,3L 2.53,9.96 Z ">
                                                        <Path.OpacityMask>
                                                            <LinearGradientBrush
                                                                EndPoint="0.76,0.77"
                                                                StartPoint="0.21,0.18">
                                                                <GradientStop
                                                                    Color="#7F000000"
                                                                    Offset="0" />
                                                                <GradientStop
                                                                    Color="#59000000"
                                                                    Offset="0.106" />
                                                                <GradientStop
                                                                    Color="#3F000000"
                                                                    Offset="0.387" />
                                                                <GradientStop
                                                                    Color="#99000000"
                                                                    Offset="0.703" />
                                                                <GradientStop
                                                                    Color="#CC000000"
                                                                    Offset="1" />
                                                            </LinearGradientBrush>
                                                        </Path.OpacityMask>
                                                    </Path>
                                                    <Path
                                                        Fill="{TemplateBinding Foreground}"
                                                        Stretch="Fill"
                                                        Height="6.74"
                                                        Width="6.81"
                                                        Canvas.Left="7.47"
                                                        Canvas.Top="1.89"
                                                        Data="M1.41,1.83 L0.71,2.54 L4.20,6.03 L4.91,5.33 z M3.24,0 L6.81,3.42 L3.5,6.74 L0,3.24 z" />
                                                    <Path
                                                        Stretch="Fill"
                                                        Stroke="{TemplateBinding Foreground}"
                                                        StrokeLineJoin="Round"
                                                        Height="12.5"
                                                        Width="12.43"
                                                        Canvas.Left="2.03"
                                                        Canvas.Top="1.50"
                                                        Data="F1 M 13.77,4.22L 11.73,2.18C 11.12,1.78 10.46,2.15 10,2.5L 3.04,9.45C 2.65,9.86 2.53,10.47 2.53,10.73L 2.53,13.5L 5.32,13.5C 5.57,13.5 6.33,13.36 6.64,12.93L 13.54,6.03C 13.86,5.72 14.17,4.74 13.77,4.22 Z" />
                                                    <Path
                                                        Fill="{TemplateBinding Foreground}"
                                                        Stretch="Fill"
                                                        Height="2.29"
                                                        Width="2.33"
                                                        Canvas.Left="2.58"
                                                        Canvas.Top="11.18"
                                                        Data="F1 M 2.033,11.71L 4.33,14L 2.62,14C 2.17,13.93 2.09,13.79 2,13.31L 2.03,11.71 Z" />
                                                </Canvas>
                                            </Grid>
                                        </Button>
                                        <Button
                                            x:Name="NewItemButton"
                                            Style="{StaticResource DataFormButtonStyle}"
                                            ToolTipService.ToolTip="Add">
                                            <Path
                                                Fill="{TemplateBinding Foreground}"
                                                Stretch="Fill"
                                                Height="9"
                                                HorizontalAlignment="Center"
                                                Margin="5"
                                                VerticalAlignment="Center"
                                                Width="9"
                                                Opacity="0.85"
                                                RenderTransformOrigin="0.5,0.5"
                                                Data="F1 M18.41,61.67 L19.56,60.52 L21.92,62.88 L24.22,60.57 L25.36,61.72 L23.06,64.03 L25.43,66.4 L24.22,67.60 L21.87,65.25 L19.56,67.56 L18.41,66.41 L20.73,64.08 L18.41,61.67 z">
                                                <Path.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        ShadowDepth="0" />
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.35,0.5"
                                                        StartPoint="-0.27,0.05">
                                                        <GradientStop
                                                            Color="#7F000000"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform />
                                                        <SkewTransform />
                                                        <RotateTransform
                                                            Angle="45" />
                                                        <TranslateTransform
                                                            X="0.18"
                                                            Y="-0.07" />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Button>
                                        <Button
                                            x:Name="DeleteItemButton"
                                            Style="{StaticResource DataFormButtonStyle}"
                                            ToolTipService.ToolTip="Delete">
                                            <Path
                                                Fill="{TemplateBinding Foreground}"
                                                Stretch="Fill"
                                                Height="9"
                                                HorizontalAlignment="Center"
                                                Margin="5,5,5,5"
                                                VerticalAlignment="Center"
                                                Width="9"
                                                Opacity="0.85"
                                                RenderTransformOrigin="0.5,0.5"
                                                Data="F1 M24.32,60.48 L25.60,61.76 L19.65,67.75 L18.37,66.46 z">
                                                <Path.Effect>
                                                    <DropShadowEffect
                                                        BlurRadius="8"
                                                        Color="#FFFFFFFF"
                                                        Direction="100"
                                                        ShadowDepth="0" />
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush
                                                        EndPoint="0.74,0.66"
                                                        StartPoint="-0.44,-0.11">
                                                        <GradientStop
                                                            Color="#7F000000"
                                                            Offset="0" />
                                                        <GradientStop
                                                            Color="#BF000000"
                                                            Offset="0.25" />
                                                        <GradientStop
                                                            Color="#FF000000"
                                                            Offset="1" />
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <RotateTransform
                                                            Angle="45" />
                                                        <TranslateTransform
                                                            X="0.06"
                                                            Y="-0.01" />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Button>
                                    </StackPanel>
                                </Grid>
                                <ScrollViewer
                                    Style="{StaticResource CustomScrollViewerStyle}"
                                    Background="{x:Null}"
                                    IsTabStop="False"
                                    Padding="{TemplateBinding Padding}"
                                    Grid.Row="1"
                                    VerticalScrollBarVisibility="Auto">
                                    <ContentPresenter
                                        x:Name="ContentPresenter"
                                        Margin="7,7,1,7" />
                                </ScrollViewer>
                                <dataInput:ValidationSummary
                                    x:Name="ValidationSummary"
                                    MaxHeight="100"
                                    BorderThickness="0"
                                    Grid.Row="2" />
                                <StackPanel
                                    HorizontalAlignment="Right"
                                    Grid.Row="3"
                                    Orientation="Horizontal">
                                    <Button
                                        x:Name="CommitButton"
                                        Margin="0,5,8,5"
                                        MinHeight="17"
                                        MinWidth="71"
                                        Visibility="Collapsed"
                                        HorizontalContentAlignment="Center"
                                        VerticalContentAlignment="Center"
                                        Content="OK"
                                        Style="{StaticResource DataFormButtonStyle}" />
                                </StackPanel>
                            </Grid>
                        </Border>
                        <Border
                            x:Name="DisabledVisual"
                            IsHitTestVisible="False"
                            Opacity="0"
                            Background="#8CFFFFFF"
                            CornerRadius="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--GridSplitter-->
    <Style
        TargetType="controls:GridSplitter">
        <Setter
            Property="Background"
            Value="#FFFFFFFF" />
        <Setter
            Property="IsTabStop"
            Value="true" />
        <Setter
            Property="HorizontalAlignment"
            Value="Right" />
        <Setter
            Property="PreviewStyle">
            <Setter.Value>
                <Style
                    TargetType="Control">
                    <Setter
                        Property="Background"
                        Value="#FF868686" />
                    <Setter
                        Property="Template">
                        <Setter.Value>
                            <ControlTemplate
                                TargetType="Control">
                                <Grid
                                    x:Name="Root"
                                    Opacity=".5">
                                    <Rectangle
                                        Fill="{TemplateBinding Background}" />
                                    <Grid
                                        x:Name="HorizontalTemplate"
                                        Height="6" />
                                    <Grid
                                        x:Name="VerticalTemplate"
                                        Width="6"
                                        Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:GridSplitter">
                    <Grid
                        x:Name="Root"
                        IsHitTestVisible="{TemplateBinding IsEnabled}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Root"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.5" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Unfocused" />
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle>
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource Arrow2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Grid
                            x:Name="HorizontalTemplate"
                            Height="10">
                            <StackPanel
                                Height="6"
                                VerticalAlignment="Center">
                                <Rectangle
                                    Fill="#FF868686"
                                    StrokeThickness="0"
                                    Height="1"
                                    Margin="1"
                                    Width="10" />
                                <Rectangle
                                    Fill="#FF868686"
                                    StrokeThickness="0"
                                    Height="1"
                                    Margin="1"
                                    Width="10" />
                            </StackPanel>
                        </Grid>
                        <Grid
                            x:Name="VerticalTemplate"
                            Width="10"
                            Visibility="Collapsed">
                            <StackPanel
                                VerticalAlignment="Center"
                                Width="6"
                                Orientation="Horizontal">
                                <Rectangle
                                    Fill="#FF868686"
                                    StrokeThickness="0"
                                    Height="10"
                                    Margin="1"
                                    Width="1" />
                                <Rectangle
                                    Fill="#FF868686"
                                    StrokeThickness="0"
                                    Height="10"
                                    Margin="1"
                                    Width="1" />
                            </StackPanel>
                        </Grid>
                        <Rectangle
                            x:Name="FocusVisual"
                            StrokeThickness="1"
                            IsHitTestVisible="false"
                            Opacity="0"
                            Stroke="{StaticResource checkIconStroke}"
                            Margin="-1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DomainUpDown -->
    <Style
        TargetType="inputToolkit:DomainUpDown">
        <Setter
            Property="Padding"
            Value="5,0" />
        <Setter
            Property="Foreground"
            Value="{StaticResource ButtonFontColor}" />
        <Setter
            Property="BorderBrush"
            Value="{StaticResource ButtonFontColor}" />
        <Setter
            Property="BorderThickness"
            Value="1,1.5,.5,.5" />
        <Setter
            Property="IsEnabled"
            Value="True" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="inputToolkit:DomainUpDown">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="00:00:00.001"
                                            Storyboard.TargetName="HasFocus"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <ContentControl
                                Padding="0,0,20,0"
                                x:Name="Visualization"
                                Margin="0"
                                Opacity="1"
                                IsTabStop="False"
                                IsHitTestVisible="False"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Value}"
                                ContentTemplate="{TemplateBinding ItemTemplate}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                Foreground="{TemplateBinding Foreground}" />

                            <TextBox
                                MinWidth="20"
                                Padding="0,0,20,0"
                                x:Name="Text"
                                Text="{TemplateBinding Value}"
                                IsEnabled="True"
                                AcceptsReturn="False"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                TextAlignment="Right"
                                TextWrapping="NoWrap"
                                Foreground="{TemplateBinding Foreground}"
                                Background="White"
                                BorderBrush="{TemplateBinding BorderBrush}" />
                        </Grid>
                        <inputToolkit:ButtonSpinner
                            x:Name="Spinner"
                            IsEnabled="True"
                            HorizontalAlignment="Right"
                            Width="18"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch">
                            <Border
                                CornerRadius="0,3,3,0"
                                Background="{TemplateBinding BorderBrush}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch" />
                        </inputToolkit:ButtonSpinner>
                        <Border
                            x:Name="HasFocus"
                            CornerRadius="7"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            Margin="-3"
                            Visibility="Collapsed">
                            <Border.OpacityMask>
                                <LinearGradientBrush
                                    EndPoint="0,.5"
                                    StartPoint="1,.5">
                                    <GradientStop
                                        Color="#99000000"
                                        Offset="0" />
                                    <GradientStop
                                        Color="#33FFFFFF"
                                        Offset=".5" />
                                    <GradientStop
                                        Color="#99000000"
                                        Offset="1" />
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ThumbStyleDown-->
    <Style
        x:Key="ThumbStyleDown"
        TargetType="Thumb">
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Press"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="Base"
                            Stretch="Fill"
                            StrokeLineJoin="Round">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Over"
                            Stretch="Fill"
                            Opacity="0">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Press"
                            Stretch="Fill"
                            Opacity="0">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Highlight"
                            Margin="1"
                            Stretch="Fill">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="DisabledVisualElement"
                            Fill="#FFFFFFFF"
                            Stroke="#FFFFFFFF"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            Opacity="0.25"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="FocusVisualElement"
                            Margin="-1"
                            Stroke="{StaticResource btnFocus}"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            IsHitTestVisible="false"
                            Visibility="Collapsed">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Path
                            x:Name="arrow"
                            Stroke="{StaticResource ButtonFontColor}"
                            StrokeThickness="2"
                            Data="M 1,1.5 L 4.5,5 L 8,1.5"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderTransformOrigin="0.5,0.5"
                            Height="4.5"
                            Stretch="Fill"
                            UseLayoutRounding="False"
                            Width="10"
                            StrokeStartLineCap="Round"
                            StrokeEndLineCap="Round"
                            StrokeLineJoin="Round" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ThumbStyleRight-->
    <Style
        x:Key="ThumbStyleRight"
        TargetType="Thumb">
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="MouseOver" />
                                    <VisualTransition
                                        GeneratedDuration="00:00:00.1"
                                        To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Over"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Press"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="DisabledVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetName="FocusVisualElement"
                                            Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="Base"
                            Stretch="Fill"
                            StrokeLineJoin="Round">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Over"
                            Stretch="Fill"
                            Opacity="0">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Press"
                            Stretch="Fill"
                            Opacity="0">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="Highlight"
                            Margin="1"
                            Stretch="Fill">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="DisabledVisualElement"
                            Fill="#FFFFFFFF"
                            Stroke="#FFFFFFFF"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            Opacity="0.25"
                            IsHitTestVisible="false"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="FocusVisualElement"
                            Margin="-1"
                            Stroke="{StaticResource btnFocus}"
                            StrokeThickness="1"
                            StrokeLineJoin="Round"
                            Stretch="Fill"
                            IsHitTestVisible="false"
                            Visibility="Collapsed">
                            <Rectangle.Fill>
                                <SolidColorBrush
                                    Color="{StaticResource ItemOver2}" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Path
                            x:Name="arrow"
                            Stroke="{StaticResource ButtonFontColor}"
                            StrokeThickness="2"
                            Data="M 1,1.5 L 4.5,5 L 8,1.5"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            RenderTransformOrigin="0.5,0.5"
                            Height="4.5"
                            Stretch="Fill"
                            UseLayoutRounding="False"
                            Width="10"
                            StrokeStartLineCap="Round"
                            StrokeEndLineCap="Round"
                            StrokeLineJoin="Round">
                            <Path.RenderTransform>
                                <CompositeTransform
                                    Rotation="-90" />
                            </Path.RenderTransform>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ListBoxItemsPanelTemplateHorizontal-->
    <ItemsPanelTemplate
        x:Key="ListBoxItemsPanelTemplateHorizontal">
        <StackPanel
            Orientation="Horizontal">
            <i:Interaction.Behaviors>
                <ei:FluidMoveBehavior
                    AppliesTo="Children"
                    Duration="0:0:0.5">
                    <ei:FluidMoveBehavior.EaseY>
                        <CircleEase
                            EasingMode="EaseInOut" />
                    </ei:FluidMoveBehavior.EaseY>
                    <ei:FluidMoveBehavior.EaseX>
                        <CircleEase
                            EasingMode="EaseInOut" />
                    </ei:FluidMoveBehavior.EaseX>
                </ei:FluidMoveBehavior>
            </i:Interaction.Behaviors>
        </StackPanel>
    </ItemsPanelTemplate>

    <!--ListBoxItemsPanelTemplateVertical-->
    <ItemsPanelTemplate
        x:Key="ListBoxItemsPanelTemplateVertical">
        <StackPanel
            Orientation="Vertical">
            <i:Interaction.Behaviors>
                <ei:FluidMoveBehavior
                    AppliesTo="Children"
                    Duration="0:0:0.5">
                    <ei:FluidMoveBehavior.EaseY>
                        <CircleEase
                            EasingMode="EaseInOut" />
                    </ei:FluidMoveBehavior.EaseY>
                    <ei:FluidMoveBehavior.EaseX>
                        <CircleEase
                            EasingMode="EaseInOut" />
                    </ei:FluidMoveBehavior.EaseX>
                </ei:FluidMoveBehavior>
            </i:Interaction.Behaviors>
        </StackPanel>
    </ItemsPanelTemplate>

    <!--ListBoxItemStyleNoPadding-->
    <Style
        x:Key="ListBoxItemStyleNoPadding"
        TargetType="ListBoxItem">
        <Setter
            Property="Padding"
            Value="3" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <Setter
            Property="Background"
            Value="Transparent" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="TabNavigation"
            Value="Local" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ListBoxItem">
                    <Grid
                        Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To=".35"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="fillColor" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To=".55"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="contentPresenter" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To=".75"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="fillColor2" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Duration="0"
                                            Storyboard.TargetProperty="Visibility"
                                            Storyboard.TargetName="FocusVisualElement">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="fillColor"
                            IsHitTestVisible="False"
                            Opacity="0"
                            RadiusY="1"
                            RadiusX="1" />
                        <Rectangle
                            x:Name="fillColor2"
                            IsHitTestVisible="False"
                            Opacity="0"
                            RadiusY="1"
                            RadiusX="1" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Content="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                        <Rectangle
                            x:Name="FocusVisualElement"
                            RadiusY="1"
                            RadiusX="1"
                            StrokeThickness="1"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
